SQL Server copies the tables in the database to another database

Source: Internet
Author: User

First, the table structure of a table needs to be copied from one data (a) library to another database (B). The operation step is as follows:

① in Database A, select the tables that you want to replicate. Right-Select the Edit table script to creat to the new Query editing window.

② in the newly opened Query window, use CTRL + A to copy the script after you select all.

③ opens a new query. Paste the copied script into the new query page. and modify the database name in the first row of the script to the target database (database B) name. Click Execute this script.

④ can see the table being copied in the table structure of the target database (database B).

Second, it is necessary to copy the contents of a table from one database (a) to another database (B). The operation step is as follows:

① Select Target Database (B), right-click: task---import data.

② follow the SQL Server Import and Export Wizard. Fill in the corresponding source and target table information. As shown in the following:

③ can see that in the target database, the Int_browermark table structure of the source database is copied to the target database along with the data.

SQL Server copies the tables in the database to another database

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.