Quantcast
Channel: Microsoft Techies
Viewing all articles
Browse latest Browse all 430

SQL NOT LIKE will not applicable for NULL values

$
0
0
Example:
select * from emp WHERE Name NOT LIKE '%ABC%' --will return only where Name not like %ABC%, but will not return where Name is NULL

select * from emp WHERE (Name NOT LIKE '%ABC%' OR Name IS NULL) --will return only where Name not like %ABC% and will return where Name is NULL


Viewing all articles
Browse latest Browse all 430

Trending Articles