Is there any difference between "!=" and "<>" in Oracle Sql?

SqlOracle

Sql Problem Overview


I would like to know if there are any differences in between the two not equal operators <> and != in Oracle.

Are there cases where they can give different results or different performance?

Sql Solutions


Solution 1 - Sql

No there is no difference at all in functionality.
(The same is true for all other DBMS - most of them support both styles):

Here is the current SQL reference: https://docs.oracle.com/database/121/SQLRF/conditions002.htm#CJAGAABC

The SQL standard only defines a single operator for "not equals" and that is <>

Solution 2 - Sql

Actually, there are four forms of this operator:

<>
!=
^=

and even

¬= -- worked on some obscure platforms in the dark ages

which are the same, but treated differently when a verbatim match is required (stored outlines or cached queries).

Solution 3 - Sql

At university we were taught 'best practice' was to use != when working for employers, though all the operators above have the same functionality.

Solution 4 - Sql

According to this article, != performs faster

http://www.dba-oracle.com/t_not_equal_operator.htm

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionMesopView Question on Stackoverflow
Solution 1 - Sqla_horse_with_no_nameView Answer on Stackoverflow
Solution 2 - SqlQuassnoiView Answer on Stackoverflow
Solution 3 - Sqluser1403581View Answer on Stackoverflow
Solution 4 - Sqluser5063308View Answer on Stackoverflow