Export table data and table structure SQL files
In the daily development process, it is often necessary to export some of the table data in a database, or the structure of a table, the data to be modified, you need to export the table's SQL structure in the database, including the table statement and data storage statements! At this time, you can use this method to operate!
steps to read
Baidu Experience: jingyan.baidu.com
Tools/Materials
Baidu Experience: jingyan.baidu.com
Method/Step
- 1
Open sqlserver2008, after successful connection, select the database to which you want to export the table-Task---generate script
Steps to read
- 2
Display: Generate and Publish Script window--Introduction (some may close the page, you can omit this step), click Next
Steps to read
- 3
Display: Generate and publish Scripts window--Select objects--Follow the pictures
Steps to read
- 4
Show: Generate and Publish Script window--Set scripting options--Follow the picture
Steps to read
- 5
After clicking on Advanced, pop-up--Advanced scripting options, select General--the data type of the script to be written--schema and data (this step is important)--Select Click OK--click Next
Steps to read
- 6
Display: Generate and Publish Script window--summary--next--complete
steps to read END
importing and executing SQL files
Click "File", "open"-"file (F) ..."
,
SQL Server 2008 Import and export SQL files