SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 TABLE INTO DATABASE
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jfm
Posting Yak Master

134 Posts

Posted - 05/30/2012 :  10:38:39  Show Profile  Reply with Quote
Hi there,

I have 2 tables in one database and I want to copy them into another database.

Which is the query?

Thanks

DonAtWork
Flowing Fount of Yak Knowledge

2113 Posts

Posted - 05/30/2012 :  11:04:12  Show Profile  Reply with Quote
www.sqlteam.com/forums/topic.asp?TOPIC_ID=170858









How to ask: http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

For ultra basic questions, follow these links.
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
48076 Posts

Posted - 05/30/2012 :  15:44:38  Show Profile  Reply with Quote
quote:
Originally posted by jfm

Hi there,

I have 2 tables in one database and I want to copy them into another database.

Which is the query?

Thanks


multiple ways

1. Export Import wizard
2. Linked server
3. OPENROWSET

if you want to preserve constraints, indexes etc also script the tables out and run it in new database using generate scripts wizard

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000