What is the difference between := and = in Oracle PL/SQL

20,048

= is the equality comparison operator, both in PL/SQL and SQL. := is the PL/SQL value assignment operator.

These are analogous to == and = in C-derived languages.

Share and enjoy.

Share:
20,048
Yue Harriet Huang
Author by

Yue Harriet Huang

Updated on November 14, 2020

Comments

  • Yue Harriet Huang
    Yue Harriet Huang over 3 years

    I want to know in Oracle PL/SQL,

    = can be used for Boolean comparison, can it be used for assignment as well?

    While is := used for variable initialization, can it be used for assignment too?

    Then, so what is the difference between the use of 2?

    Thanks!