Friday 1 May 2015

Create A New Table From An Existing Table In MS SQL Server


If I want to transfer (copy) table and its record from one database to another, I would do this for example:

Select * Into [Database2].[Dbo].[Table1] From [Database1].[Dbo].[Table1]

Basically, that's how it can be done. You can alter the structure of the newly created table
by adding records from JOIN or via creation of new fields using CAST.

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...