SQL Server: creating table scripts

Alex A
Alex A used Ask the Experts™
on
I have to recreate empty database from existing one: tables, views, constrains, indexes, defaults etc. What are my choices?
Thanks.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Type of data = schema only
David ToddSenior Database Administrator

Commented:
Hi,

How much data? That is, how much of a pain would it be to simply restore the database and delete the unwanted data?

And, if you do the above, how much 'setup data' is in the database that then needs to be found and copied across?

Regards
  David
Vikas GargAssociate Principal Engineer
Top Expert 2014

Commented:
Hi,

Right click Database

In the Tasks Tab

Click on Generate Scripts

Generate Script
Click Next

2
Click Next
3
Click on Advance

and Choose the option as below,

4

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start Today