What is the best way to create a copy of all data from database A in database B using SQL (and not a file copy)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There is two approach check which one you prefers. but I think if possible i will follow first approach. But I have never done it.
First Approach Copy the first database and paste with some othername see following url
How to copy existing database from one app to another
Second Approach copy the contents of two database
Step-1 First Attach two databases
The DATABASE keyword is optional, but I like the clarity of it. filename should be the path to the database file you wish to attach, and the database-name is a unique name.
Step-2 Run Insert Into commands for the tables you want to transfer.