Wednesday, February 16, 2022

How to copy a table to another table?

To copy a table to another table without constraints:

                SELECT * 

                INTO table1

                FROM tables2; 


       To copy a table to another table with constraints:

                Using SSMS -> Object Explorer ->Expand Database -> Select Database -> Right                     click on table and generate Script

                

No comments:

Post a Comment