C#中的语句格式问题
如果想将如下语句:
string sqlInsert = @"insert into HTPOrderTransaction values("
+ "'" + storeCode + "'" + ","
+ "'" + terminalID + "'" + ","
+ "'" + sequenceNo + "'" + ","
+ "'" + employeeCode + "'" + ","
+ "'" + scheduleDate + "'" + ","
+ "'" + barCode + "'" + ","
+ "'" + quantity + "'" + ","
+ "'" + entryDate + "'" + ","
+ "'" + createDate + "'" + ","
+ "'" + amendDate + "'" + ")";
改写成如下格式:
string sqlSelect = string.Format(@"select StoreCode,TerminalID,SequenceNo from
HTPOrderTransaction where StoreCode = {0}
and TerminalID = '{1}' and SequenceNo = {2}",storeCode,terminalID,sequenceNo);
请教:应该怎么写呢?