July 17, 2012 at 12:05 pm
I've searched for this in the forum and can't seem to find anything.
I'm reviewing a procedure that has been in place for years...
What does the != represent in a portion of a Where clause below? Don't recall seeing != being used before.
WHERE Name.FIRST_NAME != ''
Thanks.
Roger
July 17, 2012 at 12:08 pm
That is not equal, != is equivalent to <>.
July 17, 2012 at 12:19 pm
The ! means NOT, so != means not equals. Similarly you can have !> (not greater than) and !< (not less than).
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 17, 2012 at 12:23 pm
Thanks all! Is the use of the ! applicable in any version of SQL? 2000? 2005? 2008? 2008 R2? Not sure if it is old syntax or something that is being phased out.
Roger
July 17, 2012 at 12:26 pm
All. No, it's not being phased out.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply