Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Oracle Not Equals Operator

Tags:

There are two not equals operator - != and <>.

What's the difference between them? I heard that != is more efficient than other for comparing strings. Could anyone give a qualitative comment on this statement.

like image 615
kuriouscoder Avatar asked Nov 03 '10 17:11

kuriouscoder


2 Answers

They are the same (as is the third form, ^=).

Note, though, that they are still considered different from the point of view of the parser, that is a stored outline defined for a != won't match <> or ^=.

This is unlike PostgreSQL where the parser treats != and <> yet on parsing stage, so you cannot overload != and <> to be different operators.

like image 136
Quassnoi Avatar answered Dec 01 '22 22:12

Quassnoi


There is no functional or performance difference between the two. Use whichever syntax appeals to you.

It's just like the use of AS and IS when declaring a function or procedure. They are completely interchangeable.

like image 43
Justin Cave Avatar answered Dec 01 '22 22:12

Justin Cave