查询表中含有某个字符串的所有行 查询表中含有某个字符串的所有行,请问要怎么写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 1、select * from table where columnname like '%字符串%'2、select * from table where patindex('%字符串%',columnname)>0 select *from tbwhere charindex('某字符串',col)>0 select * from tb where charindex('某字符串',列名)>0 --查询所有列的话就用*select * from table where columnname like '%字符串%'--这样可以,但是如果数据量过大的话速度会有所影响 select * from table where columnname like '%string%' 下面这条SQL有问题么? 用链接服务器调用有返回值ORACLE存储过程 执行成本3.57帮我优化一下吧,活不了了 急求一SQL语句 update误操作,怎么能恢复? 高分请教,sql语句的写法,在线等,急! 如何求总? 一个关于sqlserver的怪问题。 oracle 里怎么能够通过sql语句的方法看见表的主键和外键? erp中的查询 求优化方案 求助!在线等! 求一条sql语句
2、select * from table where patindex('%字符串%',columnname)>0
from tb
where charindex('某字符串',col)>0
--查询所有列的话就用*
select * from table where columnname like '%字符串%'
--这样可以,但是如果数据量过大的话速度会有所影响