请教一个简单的变量问题? dbCommand.CommandText = "select * from table where CLS_ID = "+a+ "; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 dbCommand.CommandText = "select * from table where CLS_ID = "+a+ ;最后的+a+要不要引号啊?我也学习学习 dbCommand.CommandText = "select * from table where CLS_ID = "+a; 不就行了吗 --先在前面判断:string a;...if (a.trim().tostring()==""){ a="CLS_ID";}这样输入空的时候就查询全部了.select * from table where CLS_ID = CLS_ID--如果是数字的话:select * from table where CLS_ID = "+a.tostring(); --是字符:select * from table where CLS_ID = " + "'" +a+ "'" ; CentOS5.4安装Oracle10g 出现乱码 急:oracle如何获取nclob字段的值? 一个比较畸歪的PL/SQL问题 REHL 5 安装oracle 11g----如何解决? oracle回滚出错 Oracle procedure update set select from 有点想不通 问两个plsql中查询的语句怎么写了? 求教一个比较怪异的SQL查询问题的解决方案!谢谢大家了! 紧急求助:在应用程序中用exp按条件导出多个表中的数据的问题 高手救急,以下的 strWhere 作为参数值,为何传不进去值?书写的语法有何问题呢? 简单的送分的问题
我也学习学习
不就行了吗
...
if (a.trim().tostring()=="")
{
a="CLS_ID";
}这样输入空的时候就查询全部了.
select * from table where CLS_ID = CLS_ID
--如果是数字的话:
select * from table where CLS_ID = "+a.tostring(); --是字符:
select * from table where CLS_ID = " + "'" +a+ "'" ;