How to insert values into a table after truncation ?
647530Jul 8 2008 — edited Jul 8 2008Hi experts,
I have two tables suppose aa and bb in my local server .Now bb has the same structure as that of aa .Now i want to truncate the table aa and insert all the values of bb into aa.
I am not getting the correct way to proceed.In the following code i have tried to truncate the table aa but now how will i insert all the row entries into the table aa from the table bb.please help me in this regard.Can u give me any sql commands or stored procedure to acheive the same ..
Looking forward for ur response....
[\n]
SQL> create table aa(
2 sid varchar2(20),
3 name varchar2(20)
4 )
5 /
Table created.
SQL> insert into aa values('12','bb');
1 row created.
SQL> insert into aa values('13','cc');
1 row created.
SQL> TRUNCATE TABLE aa DROP STORAGE;
Table truncated.
SQL> select * from aa;
no rows selected
[n]