Home » Programming / Coding

Script Create Table With Indexes – MS SQL

30 June 2010 1,025 views No Comment

In SQL Management Studio if you
right click on a table > click on Script Table As > Click on the Create > Click on File/Clipboard… option
you won’t get the indexes on the script to carry over.

Solution:
Right click on database
Tasks
Generate Scripts
Click Next
Choose database
On the Choose Script Options window under Table/View Options set Script Indexes to true
Click Next
……

Taken from our Webmaster Forum http://www.webcosmoforums.com/databases/20353-script-create-table-indexes-ms-sql.html

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.