How will you create one table (target table) from another table (source table). The target table should be empty after creation.
How to insert data from one table to an empty table
How will you create one table (target table) from another table (source table). The target table should be empty after creation.
How to insert data from one table to an empty table
try this
create table targetTableName [(columnname,columnname)] as select columnname,columnname from sourcetablename where 1 = 2
this will create a target table without taking any record.
Now to enter data from one table to another
insert into newtablename select columnname,columnname from oldtablename