locked
Script Table with secondary indexes RRS feed

  • Question

  • I used the option "Script Table" --> "Create to" in SQL Server Management Studio Express for a table with secondary index (like IX_IndexName),  but in the .sql script file there is only  the instruction for the primary key and not for the secondary (I expected something like CREATE INDEX). What can I do?

    Friday, May 26, 2006 11:02 AM

Answers

  • Hi,

    its not within the context menu, you have to do it via the script wizard which can be found by right clicking on the database and choosing to script the database objects. In the next steps you can switch a boolean to create also the indexes within the table.

    HTH, jens Suessmeyer.

    ---
    http://www.sqlserver2005.de
    ---
    Friday, May 26, 2006 4:05 PM

All replies

  • Hi,

    its not within the context menu, you have to do it via the script wizard which can be found by right clicking on the database and choosing to script the database objects. In the next steps you can switch a boolean to create also the indexes within the table.

    HTH, jens Suessmeyer.

    ---
    http://www.sqlserver2005.de
    ---
    Friday, May 26, 2006 4:05 PM
  • It work fine, very thanks

     

    Monday, May 29, 2006 10:29 AM