Wednesday, August 8, 2012

how to copy one table data to another table

Syntax to copy the structureof the one table into another table.

syn: select * into newtablename from oldtablename where false condition

ex: select * into dept1 from dept where id=9

sytanx to copy one table data into another table.

syn: insert into newtable name select * from old tablename

ex: insert into dept1 select * from dept.

No comments:

Post a Comment