怎样查询数据中带“ ' "的数据
比如:类似 ABDE'dsd的数据
------解决方案--------------------
- SQL code
create table tb(code varchar(120))insert tb select 'ABDE''dsd' union select 'sfs' union select 'assfdf''sdf' select * from tb where CHARINDEX ('''',code)>0 /* codeABDE'dsdassfdf'sdf*/drop table tb
------解决方案--------------------
------解决方案--------------------
- SQL code
select * from table_name where 名称 = 'ass''edds' --需要转义一下,用2个'代表一个'