日期:2014-05-18  浏览次数:20404 次

帮我看一下这个SQL语句错在哪里 string strSql= "select * from aa where FuName like '% @FuName %' order by id desc";
帮我看一下这个SQL语句错在哪里   string   strSql=   "select   *   from   aa   where   FuName   like   '%   @FuName   % '   order   by   id   desc ";

帮我改一下吧

------解决方案--------------------
@
------解决方案--------------------
'% '+@FuName + '% '
------解决方案--------------------
string strSql= "select * from aa where FuName like '% "+@FuName+ " % ' order by id desc ";

------解决方案--------------------
'% ”+@FuName +“% '
------解决方案--------------------
string strSql= "select * from aa where FuName like '% '+@FuName+ '% ' order by id desc ";


------解决方案--------------------
打开SQL 查询分析器,把你的这段sql语句copy上去,编译,自己找错(备注:变量的地方,自己随意写个测试值,引号去掉,只要编译没错就行了)