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...
= is the equality comparison operator, both in PL/SQL and SQL. := is the PL/SQL value assignment operator.
The plus sign is Oracle syntax for an outer join. There isn't a minus operator for joins. An outer join means return all rows from one table. Also return the rows from the outer joined where there's a match on the join key. If there's no matching row, return null.
Syntax: SELECT SUBSTRING(column_name,1,length(column_name)-N) FROM table_name; Example: Delete the last 2 characters from the FIRSTNAME column from the geeksforgeeks table.
:= 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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With