Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what's the difference between ::= and := in oracle?

This is impossible to search on google, bing, yahoo, etc, because it uses symbols. How annoying!

What's the difference between ::= and := in oracle's pl/sql?

like image 492
dansch Avatar asked Aug 26 '14 19:08

dansch


People also ask

What does := mean in Oracle?

:= is the assignment operator in PL/SQL (Oracle's procedural extension to SQL). You use this to assign values to variables. If you just use = then this is checking for equality rather than assigning a value.

What is the difference between the and := operators in PL SQL?

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

What is not equal operator in Oracle?

In Oracle, not equal operator is used for checking inequality. != or <> can be used for checking inequality in a query.


1 Answers

I am not sure about ::= as I have not seen that in Oracle but the wiki says about :=

In computer programming languages, the equals sign typically denotes either a boolean operator to test equality of values (e.g. as in Pascal or Eiffel), which is consistent with the symbol's usage in mathematics, or an assignment operator (e.g. as in C-like languages). Languages making the former choice often use a colon-equals (:=) or ≔ to denote their assignment operator. Languages making the latter choice often use a double equals sign (==) to denote their boolean equality operator.

Also check here:

The assignment operator in PL/SQL is a colon plus an equal sign (:=). PL/SQL string literals are delimited by single quotes

like image 91
Rahul Tripathi Avatar answered Sep 27 '22 19:09

Rahul Tripathi