Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Table default sort order
Message
De
14/03/2008 09:25:02
 
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Conception bases de données
Titre:
Table default sort order
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01302099
Message ID:
01302099
Vues:
42
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.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform