Nasser
Nasser

Reputation: 2140

How can I view tables as query text in SQL Server 2008

I created a table in SQL Server 2008 in designer mode. Now I would like to show this table as query statement (create table ..)

Is there an option that shows the table as query mode?

Thanks

Upvotes: 1

Views: 365

Answers (2)

grahamj42
grahamj42

Reputation: 2762

In SQL Server Management Studio, right-click on the table name and Script as CREATE TABLE

Upvotes: 2

Martin
Martin

Reputation: 16453

Right-click on the table in the Object Browser, and select:

Script Table as -> CREATE To -> New Query Editor Window

Upvotes: 3

Related Questions