Can we use a parameter in a pl sql subprogram other than in where clause

Yes. Once you declare the variables in a PLSQL program, you can use it anywhere in the program. See below an example

   var   VARCHAR2 (100);                                  -- Variable declared
   var := 'My name is jack';                              -- Assigning a string to the varibale

   DBMS_OUTPUT.put_line (var);                            -- Displaying it.

   SELECT 'My name is Mack' INTO var FROM DUAL;

   DBMS_OUTPUT.put_line (var);

I hope this helps.

Browse More Popular Posts

Leave a Comment