July 16, 2010 at 12:39 pm
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?
July 19, 2010 at 12:51 pm
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.
July 19, 2010 at 2:16 pm
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.
July 19, 2010 at 2:56 pm
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.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply