--查找table_a 表中 id 字段中含有"a"或者"b"的记录. select * from table_a where charindex('a',id)>0 or charindex('b',id)>0 select * from dbo.tbproduct where charindex(',43,',classid)=0 and charindex(',1,',classid)=0