7

Possible Duplicate:
Testing for inequality in T-SQL

Hi,

does there any different to use the '!=' vs '<>' vs 'Not'?

which one will have the worst performance

or it exist just because of the backward compatibility syntax?

Community
  • 1
  • 1
mengchew0113
  • 409
  • 2
  • 5
  • 12

2 Answers2

10
  • NOT does not always act the same
  • != or <> are identical, no deprecation mentioned. <> is ISO though
onedaywhen
  • 55,269
  • 12
  • 100
  • 138
gbn
  • 422,506
  • 82
  • 585
  • 676
5

AFAIK, if you want to check for NULL, you must use IS NOT and not != or <>

abatishchev
  • 98,240
  • 88
  • 296
  • 433
alxx
  • 9,897
  • 4
  • 26
  • 41