Friday, March 9, 2018

PL/SQL Cursor to Return One Row with Multiple Columns: Example Guide

declare
       cursor s is select employee_id,first_name,salary
       from emp ;
       v_id emp.employee_id%type;
       v_name emp.first_name%type;
       v_sal emp.salary%type;
begin
      open s;
   
      fetch s into v_id,v_name,v_sal;
      dbms_output.put_line(v_id||' '||v_name||' '||v_sal);
   
end;

OUTPUT:
     100 Steven 24000

👋 Hi, I'm Suriya — QA Engineer with 4+ years of experience in manual, API & automation testing.

📬 Contact Me | LinkedIn | GitHub

📌 Follow for: Real-Time Test Cases, Bug Reports, Selenium Frameworks.

No comments:

Post a Comment