当前位置: 代码迷 >> Sql Server >> 模糊查询的有关问题。
  详细解决方案

模糊查询的有关问题。

热度:98   发布时间:2016-04-27 13:20:43.0
模糊查询的问题。。。。



为什么我这样查询查询不到的?[email protected]?[email protected]???

SQL code
select * from [User] a,Friends b,TypeFriends c where [email protected] and a.UserId=b.UserId and a.Realname like [email protected]%' and c.TypeFdsId=b.TypeFdsId


------解决方案--------------------
like [email protected]+'%'

[email protected]%',参数带进去时,会变成:'%'参数常量'%'。所以肯定会有错。
  相关解决方案