Generate CREATE TABLE scripts using Management Studio

sql, sql-server-2008, ssms

Solution

Right-click the table in Object Explorer, and choose Script Table As > Create To > New Query Editor Window.

You can also do this for multiple tables by using Object Explorer Details (F7):

Or right-click the database and use the Tasks > Generate Scripts wizard:

Problem

I'm looking for a way to generate the scripts for my tables.

Original source