如何在where子句中使用变量?
比如:
string strA= "abc ";
"select * from 表1 where 字段1=strA "
应该怎么写呢?谢谢!
------解决方案-------------------- "select * from 表1 where 字段1= ' "+strA+ " ' "
如果strA 字符串类型
------解决方案--------------------如果字段1是varchar等字符类型
string str = "select * from 表1 where 字段1 = ' " + strA + " ' ";