質問

Is there a difference in performance between != and <>?

Bonus: why do people get upset when I use != instead of <>? I am of course speculating that all programmers get upset about this, however I have worked for two companies now that "require" the use of <>

役に立ちましたか?

解決

Short answer: no, there's no difference in performance.

As for the bonus question, I imagine people get upset because != is not defined in the SQL 92 standard and is therefore less likely to be portable.

Edit

The SQL 92 standard can be found here and defines the not equals operator as follows:

<not equals operator> ::= <>

他のヒント

They do not have performance differences, it's certainly for matters of standards/consistence. Take a look at this question: Should I use != or <> for not equal in TSQL?

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top