字段名 为字符型的话!
string sql="select 字段名 from 表名 where 字段名 ='"+ abc+"'" ;
字段名 为整型的话!string sql="select 字段名 from 表名 where 字段名 ="+ abc ;
string sql="select 字段名 from 表名 where 字段名 ='"+ abc+"'" ;
字段名 为整型的话!string sql="select 字段名 from 表名 where 字段名 ="+ abc ;
string sql="" ;
if(abc=="")
{
sql="select 字段名 from 表名 where 字段名 =0" ;
}
if(abc!="")
{
sql="select 字段名 from 表名 where 字段名 ="+abc ;
}