Table Creation

  • SQL Studio New Table create

    I created a new table with Three non null fields. When I did this in SQL2000 with Enterprise manager I got a single clustered index.

    When I did the exact same thing for SQL2005 using SQL server Management studio it creates the table with a clustered index and three "_uq" indexes.

    What controls this?

  • It's hard to be sure of the difference without actually seeing T-SQL used to create the tables. If you used the GUI designer there shouldn't be an difference (that I'm aware of anyway) structurally if you actually did exactly the same thing.

    I don't normally use the index/constraint/key names generated by SQL Server since they're a best guess.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • Thanks for the response. I did not post the code because I in fact used the GUI in both cases.

    I posed the question more to learn from my experience rather than solving a current problem. I will not use the GUI going forward.

  • There are times I will use the GUI in a development environment but then use a tool to generate the T-SQL to make 100% sure I know exactly what the table definition is. Then I would use that statement to do the build in test and production.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

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

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