各位请帮忙!急用

wubaiyong 2003-06-10 03:06:57
我要判断一个字段中是否包含某一字符串的SQL语句如何写,谢谢!
...全文
104 5 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
abcccccc 2003-06-10
  • 打赏
  • 举报
回复
if exists(select * from TAbleA Where name like '%ldld%')
...
else
...
dafu71 2003-06-10
  • 打赏
  • 举报
回复
是不是这个:
select a.* from syscolumns a , sysobjects b where a.id=b.id and b.name like '%abcdef%'
hjb111 2003-06-10
  • 打赏
  • 举报
回复
if exists(select * from TAbleA Where name like '%ldld%')
...
else
...
dafu71 2003-06-10
  • 打赏
  • 举报
回复
select * from table1 where yourfield like '%abcdef%'
SilverSands 2003-06-10
  • 打赏
  • 举报
回复
判断那个字符串在字段中即可,若返回值为其中位置,即有串,若错误,则没有!

34,838

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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