To create a copy of a table, you can use SELECT INTO to extract all the rows from an existing table into a new table. The new table must not exist already.
The following example will copy all the rows from Address table to a new table called TempAddress
Use AdventureWorks
Go
Select * into TempAddress from Person.Address
This statement does not copy the indexes, constraints,triggers, Keys etc. to the new table
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment