开发者

script Table as Create via SSMS doesn't show unique index

Using SQL Server Management Studio 2008, why can't I see unique index ( n开发者_Go百科ot 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.


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.

script Table as Create via SSMS doesn't show unique index


Note that in SSMS 2012, you have to set "Script indexes" to TRUE to script out unique indexes.

script Table as Create via SSMS doesn't show unique index

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜