What does := mean in oracle when we use it

28.3k views Asked by At

What does := mean in oracle when we use it Please give me some demonstrations... and also how do we usually use a dynamic query in a stored procedure in oracle...

1

There are 1 answers

0
ChrisProsser On BEST ANSWER

:= 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.

Here is a very simple example using the assignment operator to assign values to variables:

Declare
   v1 number;
   v2 number;
   res number;
Begin
   --initialise values
   v1 := 2;
   v2 := 2;
   res := v1 + v2;
   dbms_output.put_line(res);
end;

I think you will need to be a bit more specific about what you want to know about dynamic SQL. As the comment above suggests, it would also be best to raise one thread per question as these are unrelated.