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

前端 未结 4 910
清歌不尽
清歌不尽 2020-12-12 18:24

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

Are there

相关标签:
4条回答
  • 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 <>

    0 讨论(0)
  • 2020-12-12 19:20

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

    0 讨论(0)
  • 2020-12-12 19:21

    According to this article, != performs faster

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

    0 讨论(0)
  • 2020-12-12 19:26

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

    0 讨论(0)
提交回复
热议问题