Possible Duplicate:
Should I use != or <> for not equal in TSQL?
Behavior of both operator is same. But i want to know about What is difference between operater != and <> in SQL Server?
Possible Duplicate:
Should I use != or <> for not equal in TSQL?
Behavior of both operator is same. But i want to know about What is difference between operater != and <> in SQL Server?
Technically both !=
and <>
are same. Even if you use them in stored procedures also they will behave same in terms of performance. As a SQL standard you should prefer <>
.
NOTE: !=
operator is not standard SQL.
They are equivalent. The only difference is that the <>
is ISO standard, the !=
is not.
Check out this link: http://msdn.microsoft.com/en-us/library/ms188074.aspx
a <> b
basically checks that a is either less than or greater than b; i.e, not equal to b. I believe both a and b are converted to their ascii values and then compared.