多字段查询优化 (like 放弃 or )

--方式1
AND
CASE WHEN new_imei LIKE @imei THEN 1 WHEN new_enterimei LIKE @imei THEN 1 ELSE 0 END = 1
 --方式2
AND CASE WHEN SUBSTRING(new_imei,0,LEN(@imei)+1) =@imei THEN 1 WHEN SUBSTRING(ISNULL(new_enterimei,''),0,LEN(@imei)+1) =@imei THEN 1 ELSE 0 END = 1

 

posted @ 2020-06-24 11:12  拾梦小侠ด้้้  阅读(236)  评论(0)    收藏  举报