Question

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 <>

Was it helpful?

Solution

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> ::= <>

OTHER TIPS

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top