Duplicate of: Should I use != or <> for not equal in TSQL
Within SQL Server's T-SQL should I use "<>" or "!=", or does it really even matter?
Duplicate of: Should I use != or <> for not equal in TSQL
Within SQL Server's T-SQL should I use "<>" or "!=", or does it really even matter?
I don't know SQLServer, but the SQL standard uses '<>', so follow the standard
I believe that != is T-SQL specific (i.e. not standard SQL). So, you should use <> if there's any chance that you'll ever port your code to use a different DBMS.
Personally, I would use <> and forget about it.
Typical SQL usage in my experience is to use <>. I've never seen anyone use !=; I wasn't even aware that worked.
!= isn't part of the standard, but it is part of T-SQL..
Duplicate Post..
Use <> since most people are familiar with that, and whenever NULLs are possible, remember that NULL is not equal to NULL, so this is sometimes necessary:
ISNULL(MY_FIELD,0) <> ISNULL(MY_FIELD,0)
I'd say it comes down to your coding conventions. I personally like to use != as <> reminds me of dirty dirty VB and gives me a bad gut feeling. Plus I comprehend it better as it is exact to C#'s not equal operator.