1。select * from c where patindex('%^%',c_add) <> 0 ---除了%都可以
如果是单引号select * from c where patindex('%''%',c_add) <> 0
select * from c where charindex('%',c_add,1) <> 0 ---楼主说的几个都可以
select * from c where charindex('''',c_add,1) <> 0 ---单引号
2。如果用like,那么使用 escape 子句的模式匹配
可搜索包含一个或多个特殊通配符的字符串。例如,customers 数据库中的 discounts 表可能存储含百分号 (%) 的折扣值。若要搜索作为字符而不是通配符的百分号,必须提供 escape 关键字和转义符。例如,一个样本数据库包含名为 comment 的列,该列含文本 30%。若要搜索在 comment 列中的任何位置包含字符串 30% 的任何行,请指定由 where comment like ''%30!%%'' escape ''!'' 组成的 where 子句。如果不指定 escape 和转义符,sql server 将返回所有含字符串 30 的行。
--escape 关键字不一定是!,其它也可以,如下
select * from c where c_add like '%!%%' escape '!'
select * from c where c_add like '%s%%' escape 's'
select * from c where c_add like '%!#%' escape '!'
select * from c where c_add like '%!^%' escape '!'