views:

66

answers:

1

Using SQL Server Management Studio 2008, why can't I see unique index ( not primary key ) when I generate Create Table SQL code?

It includes only primary key constraint. Is it by design ? There is a possibility to get SQL code for index creation via right mouse click on an index and "Script index as", but it is another step.

+2  A: 

Is the "Script Unique Keys" option set to TRUE in your SSMS?

In SSMS, Tools -> Options will get you to the pop-up window shown below. alt text

Joe Stefanelli