|Subject||Re: [firebird-support] Re: Altering Primary Key on Table|
> Will either use a second index or ORDER BY to continue.But existence of ascending or descending PK has nothing to do
with the appearance of data. If you need them ordered,
you always have to use ORDER BY.
----- Original Message -----
From: "Tony Masefield" <polsolsa@...>
Sent: Thursday, September 01, 2005 5:24 PM
Subject: [firebird-support] Re: Altering Primary Key on Table
> Thanks to HeLen, Adam and Alan for their replies.
> For information, tried dropping the constraints and re-adding the PK,
> set the sort order to descending and commited. The sort order defaults
> back to ascending.
> To answer Helen's question 'Why', it's because the table will be
> used 'as standard' in descending sort order, not ascending. Therefore
> it 'uncomlicates' matters where one has to remember to add an ORDER BY
> clause each time the table is used in an application.
> The PK is based on a generator, actually a composite field of the
> generator and a string, and is used in a grid for selecting the latest
> (hence descending sort order) record entries rather than the oldest
> (historical) ones.
> Will either use a second index or ORDER BY to continue.
> Cheers and thanks again!