Define Table in Database Diagram

  • On a similar note to this thread

    http://www.sqlservercentral.com/Forums/Topic845406-391-1.aspx?Highlight=diagram+identity+column

    I would like to be able to design a table using the database diagram tool, and create a column as an identity column, rather than saving the diagram, then going into the object explorer to change the column properties.

    There is an option to change the table view-> modify custom-> and add the Identity column - but it doesn't seem to work.

  • When using the Database Diagram app within SSMS, you can easily change a column's property to an Identity column.

    Select the column in the table that you would like to modify

    Press F4, or select "Properties Window" from the "View" menu

    The Properties Window is floating, I have mine set to dock to the far right hand side of the SSMS app

    Expand "Identity Specification" section

    Change the "Is Identity" to Yes

    Save the table

    There you have it, the column is now an Identity column, with the parameters that you set in the columns properties

    Andrew SQLDBA

  • Thanks - it works a treat!

  • AndrewSQLDBA (3/19/2010)


    When using the Database Diagram app within SSMS, you can easily change a column's property to an Identity column. Select the column in the table that you would like to modify

    Press F4, or select "Properties Window" from the "View" menu

    The Properties Window is floating, I have mine set to dock to the far right hand side of the SSMS app

    Expand "Identity Specification" section

    Change the "Is Identity" to Yes

    Save the table

    There you have it, the column is now an Identity column, with the parameters that you set in the columns properties

    Be careful to review the script SSMS generates when doing this, especially for a larger number of rows, or for tables with complex relations. The script is likely to transfer all the data to a new table, drop the original, and rename the new table. This can be a resource-intensive process.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply