Friday, March 9, 2018

PL/SQL - SELECT statement using cursor

DECLARE
       CURSOR c_deptno IS SELECT first_name, salary, department_id
       FROM EMP;
BEGIN
     For x in c_deptno
    Loop
     dbms_output.put_line(x.first_name ||' '||x.salary||' '||x.department_id);
    End loop;
     close c_deptno;
End;

output:
        Steven 24000 90
        Neena 17000 90
        Lex 17000 90
        Alexander 9000 60

👋 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