I am currently trying to spool off the results of multiple sql statements(select empid from emp where deptno = 20 select ename from emp where deptno = 25, etc) contained within a file. Running this for the moment via command line in sqlplus. Not all my statements will return results and a 'nice to have' would be a spooled output of only those statements which did return something.
What I want is the required spooled output to give me the column name for each of the rows returned, ex.
empid
-----
12
ename
-----
Gym
What I want is the required spooled output to give me the column name for each of the rows returned, ex.
empid
-----
12
ename
-----
Gym