问题,在存储过程中用like搜索是怎么用的?我总是搜索不到数据。

ckxp 2003-07-24 08:58:10
写在存储过程中的SQL语句,
@tempSearchKey char(300)

where aaa like @tempSearchKey
或者 where aaa like '%@tempSearchKey%'

都搜索不到应该搜索到的内容,请教各位?

...全文
33 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ckxp 2003-07-24
  • 打赏
  • 举报
回复
谢谢,确实是这样:)
caiyunxia 2003-07-24
  • 打赏
  • 举报
回复
where aaa like '%'+ @tempSearchKey +'%'
or
where aaa like @tempSearchKey+'%'

22,207

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server 疑难问题
社区管理员
  • 疑难问题社区
  • 尘觉
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧