开发者

SQL fundamental question '!=' vs '<>' vs 'Not' [duplicate]

开发者 https://www.devze.com 2023-01-16 18:17 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: Testing for inequality in T-SQL
This question already has answers here: Closed 12 years ago.

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 perfor开发者_JS百科mance

or it exist just because of the backward compatibility syntax?


  • NOT does not always act the same
  • != or <> are identical, no deprecation mentioned. <> is ISO though


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

0

精彩评论

暂无评论...
验证码 换一张
取 消