当前位置: 代码迷 >> ASP.NET >> 查询字符串的like有关问题!
  详细解决方案

查询字符串的like有关问题!

热度:7578   发布时间:2013-02-26 00:00:00.0
查询字符串的like问题!!!
string   sql= "select   *   from   car_photo_tab   where   note   like   '% "+strModel+ "% ' ";

note字段的内容假如是索纳塔,但strModel的内容是索纳塔1.6,结果就查不到。。。

是不是因为strModel的内容比note多,所以不能匹配呢???

如果note字段是索纳塔1.6,而strModel是索纳塔,就能查到。。。



------解决方案--------------------------------------------------------
倒过来可以
  相关解决方案