Explicit Loop Example 2 SQL
In this example I will be showing Explicit Loop.
DECLARE v_ename emp.ename%TYPE; v_sal emp.sal%TYPE; v_deptno emp.deptno%TYPE; CURSOR c_emp IS SELECT ename, sal, deptno FROM emp WHERE job = 'MANAGER'; BEGIN OPEN c_emp; LOOP FETCH c_emp INTO v_ename, v_sal, v_deptno; IF c_emp%NOTFOUND THEN EXIT; END IF; DBMS_OUTPUT.PUT_LINE(v_ename||' '||v_sal||' '||v_deptno); END LOOP; CLOSE c_emp; END; /
Total Views: 738
My name is Jean-Mathieu
I created this website so other people could enjoy finding useful stuff easier. If you have any question do not hesitate to contact me.
|jean8mathieu||Created on 02/25/15|
Disclosure: We are a website that needs compensation to operate like any other website on the internet.
We may receive consideration for our reviews but we are totally unbiased and do not accept paid reviews or fake reviews claiming to be something they are not.