I have a table like
My query is select ID from tab where Name != 'POP'
It should return 2,3. But it returns only 3.
Logically 2nd record also should come. How to proceed that.
Hi as null is not a value it cannot be compared using EQUALS operator.
Wrap the Search argument up in an isnull i.e.
select ID from tab where isnull(Name,0) !='POP'
MCSA: (SQL 2012, SQL 2008, Windows Server 2008) MCITP: (SQL BI & SQL 2008) MCT: 2000 - 2013
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.
Would you like to participate?