Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Export all tables from SQL Server into separate files

Tags:

sql-server

I want to extract only table structure from a SQL Server database. But if I extract normally using export wizard only single file is created but I want to create separate files for separate tables.

Could anybody tell me how to do this in SQL Server ?

like image 207
Ajay Beniwal Avatar asked Jun 28 '12 07:06

Ajay Beniwal


1 Answers

Go to Object Explorer, pick Generate Scripts:

enter image description here

Then select what objects to script out, and on the second page of the wizard, select Single File Per Object:

enter image description here

Run the wizard and you have your one file per object as you need it.

like image 143
marc_s Avatar answered Oct 10 '22 17:10

marc_s