How to create duplicate table with new name in SQL Server 2008
or How to copy or backup table
SELECT *
INTO new_table_name
FROM old_tablename
Or we can select only the columns we want into the new table:
SELECT column_name(s)
INTO new_table_name
FROM old_tablename
Example :
SELECT *
INTO Employee_Backup
FROM Employee
only columns:
SELECT LastName,FirstName
INTO Employee_Backup
FROM Employee
No comments:
Post a Comment