How to copy structure of table

syntax:
---------
Select * Into (DestinationTableName) From (SourceTableName) Where 1 = 2

Example:
-----------
Select * Into my_new_table From emp Where 1=2
 

Friends ....this will just create the table structure as the source table

Wont create any constraint or triggers on the table..

and if you also want to copy the data then remove the where clause..  

Friends post  your comments or questions  on my blog to improve my posts .... 

No comments:

Post a Comment