DECLARE
price_to_update NUMBER(6,2) := 20;
updated_price NUMBER(6,2) := 0;
BEGIN
dbms_output.put_line('price before ' || price_to_update);
dbms_output.put_line('updated_price before ' || updated_price);
changePrice (old_price => price_to_update, new_price => updated_price);
dbms_output.put_line('price_to_update after update ' || price_to_update);
dbms_output.put_line('updated_price after update ' || updated_price);
END;
/
in this example user is using => symbol i am unable to figure out for what purpose user using it ... KIndly Help me out ... thanks
It's the named notation for subprogram parameters (vs. positional notation). This syntax allows to:
Example:
PROCEDURE FOO(A VARCHAR2:=NULL, B VARCHAR2:=NULL, C VARCHAR2:=NULL)
... can be called as:
FOO(C=>'FOO', A=>'BAR');
It is called "named parameter notation". If you have this procedure:
procedure changeprice (old_price number, new_price number);
then you can call it with positional notation:
changeprice (price_to_update, updated_price);
or you can call it with positional notation:
changeprice (old_price => price_to_update, new_price => updated_price);
See documentation for more details.
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