Friday, March 9, 2018

PL/SQL - Anonymous block return multiple column

declare
       v_id emp.employee_id%type:=&v_no;
       v_name emp.first_name%type;
       v_sal emp.salary%type;
begin
      select employee_id,first_name,salary
      into v_id,v_name,v_sal
      from emp
      where employee_id= v_id;
      dbms_output.put_line(v_id|| ' ' ||v_name||' '||v_sal);
end;

output :
 101 Neena 17000

No comments:

Post a Comment