hyunjae
hyunjae

Reputation: 103

How do i export data from SSMS as sql?

How do I export the data as sql in SQL Management Studio?

After i have right click a table > Script As > Select TO then selected all (*), i could only export as txt file or CSV, how do I export the result/table as sql?

Upvotes: 2

Views: 7623

Answers (1)

Yasin Asadnezhad
Yasin Asadnezhad

Reputation: 189

You can do it with SQL Server Management Studio. Here are the steps :

  • Right-click your database.

  • Select Tasks > Generate Scripts...

  • Introduction Step. Click Next.

  • Choose Objects. Select Specific database objects.

  • Select your table in below.

  • Set Scripting Options. Here's the key step. In order to get all data and objects, click the Advanced button. Then in the Advanced Scripting Options, set the value for Types of data to script to Schema and data.

if you want to get data only select Data Only

  • Click OK. Then Next and Finish. You will have a script file that contains both database schema and data.

Upvotes: 8

Related Questions