Friday, November 11, 2022

How to pass multiple parameters in oracle stored procedure

 create or replace procedure multiple_parameters(par_test in varchar2)

   is
    begin
     for c in (select *
                from bidar
                where city in (select regexp_substr(par_test, '[^,]+', 1, level)
                                from dual
                                connect by level <= regexp_count(par_test, ',') + 1
                               )
              )
    loop
       dbms_output.put_line(c.city||' '||c.city||' '||c.city||' '||c.city);
end loop; end; /