String strSql=String.Format("SELECT * FROM yourTable WHERE 1=1 ")
if(abc!="")
{
strSql+=" and 字段名="+abc;或者strSql+=" and 字段名 LIKE '%"+abc+"%'";
}
String strSql=String.Format("SELECT * FROM yourTable WHERE 1=1 ")
if(abc!="")
{
strSql+=" and 字段名="+abc;或者strSql+=" and 字段名 LIKE '%"+abc+"%'";
}