22智能在线
新记
现在用sql语句查出来字段里包含某个字符串的所有记录怎么查
如题所述
举报该文章
相关建议 2015-06-11
一般用substring函数截取出特定字段,如
--用户姓名第二个字是'大'字的
select * from Users where SUBSTRING(UserName,2,1)='大'
第二种方法就是直接like模糊查询,看具体情况使用
select * from Users where UserName like '%大%'
温馨提示:内容为网友见解,仅供参考
当前网址:
https://22.t2y.org/zz/c662cx0220th0fxxhi.html
其他看法
第1个回答 2015-06-11
select * from 表 where 字段 like '%字符串%'
第2个回答 2015-06-11
charindex() != 0
相似回答
大家正在搜
相关问题
现在用sql语句查出来字段里包含某个字符串的所有记录怎么查
sql语句中查找某字段中含有某字符串的语句怎么写?
在一个SQL数据库中怎么查出包含某个特定字段的所有数据表信息
我需要用sql语句来查询 某个字段值 中包含一个 特定字符串...
sql 语句,如何查询某张表(或几张表)中的所有字段中,含有...
sql 包含某字符串的数据查询
如何SQL查询字段值包含于字符串