sqlserver exports and imports complete data and data table structure of the database

[sqlserver exports and imports complete data and data table structure of the database]

Export database structure and data

Please add image description

Right-click on the database -> Tasks -> Generate script

Please add image description

Next step

Please add image description

You can choose to export the entire database or export individual data tables

Please add image description

Select the save method path, usually just go to a .sql file.

The essential

Click on the advanced options on the previous page
Please add image description

Select the schema and data so they can be exported together

Next, the export is completed in the next step.

import

Create a database with the same name and path in the database to be imported
or modify the path yourself.
Just open the generated sql file and execute it.

Guess you like

Origin blog.csdn.net/qq_43886548/article/details/129763708