SQL SERVER table includes a content copied from one database to another database

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/fiaofiao_monk/article/details/63254073

premise:

A database: database1, its table tabel1

Database two: database2.

Tabel1 table in the database you want to copy into the full database1 database2.


Tabel1, the right mouse button within the selected database1, the CREATE to -> New Query Editor Window


The beginning of the USE [database1] into USE [database2], and then at the end insert the following statement: insert into [table name] from the SELECT * database1 .dbo. Table1

[Table name] here is within database1 want to table1 copied to the table name in the database2 played. Point to execute.

If the following error message appears, there is a growing seeds automatically sign in the table. Open database2 has been generated in the [table name] with design patterns, will grow automatically sign into whether then executed. Execution and then restored to the seed flag on it.


Guess you like

Origin blog.csdn.net/fiaofiao_monk/article/details/63254073