Link to home
Start Free TrialLog in
Avatar of twcadmin
twcadmin

asked on

SQL Create Table Scripts Automatically

Using SQL Management Studio, I know you can right-click a table -> Script table as -> Create To -> New Query Editor Window and then I can save that as a .sql file but how can I automate this?

For example, when I start a new project, I want to be able to run a script that will generate all of the table creation scripts for me so I can back them up in the documentation folder.
ASKER CERTIFIED SOLUTION
Avatar of Andrew Crofts
Andrew Crofts
Flag of Ukraine image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of twcadmin
twcadmin

ASKER

This is very automatic. I was able to choose an options to create a new file for each object. It's not scriptable as far as I know but accomplishes when I am trying to do! Thanks!