like, charindex, substring 效率比对
SELECT * FROM doctor_r_r
WHERE r_number not like ‘%WXH%’
where r_number not like ‘WXH%’
where CHARINDEX(‘WXH’, r_number) = 0
where substring(r_number,1,3 ) <> ‘WXH’
是实际情况而定,是否有索引,数量多少,搜索的文本是否精确
like, charindex, substring 效率比对
SELECT * FROM doctor_r_r
WHERE r_number not like ‘%WXH%’
where r_number not like ‘WXH%’
where CHARINDEX(‘WXH’, r_number) = 0
where substring(r_number,1,3 ) <> ‘WXH’
是实际情况而定,是否有索引,数量多少,搜索的文本是否精确