Search This Blog

Wednesday, September 20, 2017

Create Same Table and Insert Data One Table to Another Table



Create a Table as same as another table:
create table new_table as ( select * from old_table); 
and then insert
insert into new_table ( select * from old_table);
If you want to create table without data . You can use :
create table new_table as ( select * from old_table where 1=0);

No comments:

Post a Comment

Check Difference Between Two Database Objects

Step-1. Create Two DBLINK to connect with Two Database then Step-2. define logindb= DBLINKONE define remotedb= DBLINKTWO define schema_name=...