Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Old Forums
 CLOSED - General SQL Server
 PK Indexes and Enterprise Manager

Author  Topic 

drsloat
Starting Member

45 Posts

Posted - 2001-12-10 : 17:28:40
When I create a table through Enterprise Manager and set a primary key, it always creates the index as clustered.

Now I just recently learned about indexes, but I believe that for the majority of my tables I would not want a clustered index on the pk. Can you change the default behaviour of how E. Manager creates the table?

I have to admit I haven't dug to hard to figure out how to do this, but I kinda just wanted an excuse to make a post and say how damn cool those little beer icons are!!! Keep 'em coming!

robvolk
Most Valuable Yak

15732 Posts

Posted - 2001-12-10 : 17:42:19
After you select the columns and click the gold key icon, but BEFORE you save the table, you can click Properties (littl finger icon) and go to the Indexes tab. Choose the PK index from the drop down, and you can modify it as you wish.

You could also use T-SQL, check CREATE TABLE and ALTER TABLE syntax in Books Online. It's actually pretty easy to learn and a lot more flexible than EM, and in many cases you'll be able to type it faster than using all the mouse clicks in EM.

Go to Top of Page

fisherman_jake
Slave to the Almighty Yak

159 Posts

Posted - 2001-12-10 : 17:48:28
Ahhh, I was about to reply to drsloat to do exactly what you said rob... Beat me to the punch.. The fact that I had to check for my defaults is probably what made you get the post... drsloat, EXACTLY what rob said.. .. now to figure out the toasting one [:)beer]
, [drink].. ran out of ideas.. hmmm.. will investigate some more..

==================================================
World War III is imminent, you know what that means... No Bag limits!!!
Master Fisherman
Go to Top of Page
   

- Advertisement -