Hi
Apologies if this has been answered.
I have bunch of tables that I wish to generate insert statements from select * from table query. I know in tools such as SQL Developer can export results as insert statements and can use /* insert */ in SQL Developer script. Is there equivalent for SQL in SQL Plus.
I am not even sure how to generate scripts to achieve this from dba_tab_columns as this return one row per column.
I wish to automate this. Cannot use data pump, export, sql loader etc.
Eg
Query as below
select *
from emp
To produce
Insert into EMP (EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,COMM,DEPTNO) values (7839,'KING','PRESIDENT',null,to_date('17/NOV/1981','DD/MON/RRRR'),5000,null,10);
..