I have an emp table
SQL> select * from emp;
EMPNO ENAME
---------- ----------
5000 JOHN
5001 ADAM
5002 MIKE
I need help writing a procedure to run "Select EMPNO||ENAME from emp" on one row at a time till the end of the table.
Trying to use the below statement with "N as a sequence.nextval". It does not work. Please help me resolving this.
select EMPNO||ENAME from emp
where rownum < N+1
minus
select EMPNO||ENAME from emp
where rownum < N;