Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Table default sort order
Message
From
14/03/2008 09:25:02
 
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
Database design
Title:
Table default sort order
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01302099
Message ID:
01302099
Views:
44
I have a lookup table (for pull-down menu values). The table has a primary key - clustered index on a field desired to sort the default order of the list (without having to use 'order by'). The actual data field is also a unique index, and has a foreign key in the related table.

The trouble is that the table does not get default-ordered by the primary key - clustered index. It is ordered by the data field unique index. I have experimented with test tables, and it does not seem to matter what order the indexes are created in, and I have not been able to do it in a fashion to get the default order by the sorting field.

I have been under the evident delusion that the primary key, clustered index (especially if it is the first field in the table) is used by SQL as the default ordering mechanism.

I have tried to find documentation on default ordering, but have been unsuccessful. Can anyone shed some light on this?

All help is appreciated.
Thank You

Rollin Burr

Politicians and diapers have one thing in common. They should both be changed regularly, and for the same reason.
Next
Reply
Map
View

Click here to load this message in the networking platform