SELECT INTO | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

SELECT INTO

Hi, I would like to copy all the data from a table in server1 to the same table in server2. How would I do it using SELECT INTO. Please give me a query. Thanks, Madduri
create a linked server on server2 for server1 and run the following EXEC: SELECT * INTO TableA from server1.DbName.schemaname.TableA You can also use SSIS to do the same… MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

Please remember you’d have to manually create any indexes/FK’s from the new table. ***********************
Dinakar Nethi
SQL Server MVP
***********************
http://weblogs.sqlteam.com/dinakar/
If its simple I would go with DTS and you can accomplish the task easily, before than confirm the SQL version you are using. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
http://www.SQL-Server-Performance.Com
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.
I am using sql server 2005 Madduri
You can use SSIS… MohammedU.
Moderator
SQL-Server-Performance.com All postings are provided “AS IS” with no warranties for accuracy.

]]>