查找字段的里的字符串 select * from tb1 where charindex('aaa',UName)>0 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 倒是是'aa'aaa'aaaa'ddd' 还是aaa,aaaa,aa,ddd?...select case when charindex(',aaa,',','+uname+',')>0 then '存在' else '不存在' endfrom tb 数据是这种的话'aa'aaa'aaaa'ddd' charindex('‘’aaa‘’',uname)>0在aaa前面加上单引号进行精确查询 select *,(case when charindex('''aaa''',UName) then '存在' else '不存在' end)状态 from 表名 --sorry少了>0select *,(case when charindex('''aaa''',UName)>0 then '存在' else '不存在' end)状态 from 表名 sql语句中 set 是干吗用的??? 不固定列的交叉表怎么做? 求两地最短距离 存储过程调用 求救!关于SQL不能连接的疑难问题? 请教update语句中关于引号的问题 请问zjcxc(邹建),你的存储过程分页要有总记录数怎么办? sql语句错误,请大侠帮忙!在线等待 存储过程中的动态语句 复制的数据库被质疑后该怎么办? sql 查询问题 部门表转换 求一sql实现
from tb
select *,(case when charindex('''aaa''',UName)>0 then '存在' else '不存在' end)状态 from 表名