|Subject||RE: [firebird-support] Altering Primary Key on Table|
> I need to change the sort order from ascending to descending on theyou just ADD a descending index on the field. Leave the ascending one there.
> Primary Key for an (empty) table.
The sort order is only provded by an ORDER by clause
> Have tried (Alter Index/ Drop
> Index) using IBExpert (Pers) and EMS Interbase both of which
> generate SQL errors.
> According to the IB 6 Lang Ref:
> Alter Index
> "Alter Index Fails if Index is defined for a UNIQUE, PRIMARY KEY or
> FOREIGN KEY constraint .. to alter such an index, use DROP INDEX to
> delete the index etc."
> Drop Index
> "Important- You cannot drop system-defined indexes, such as those
> for UNIQUE, PRIMARY KEYS and FOREIGN KEYS".
> So, how does one do this with an FB (1.5) Table? Must one drop the
> table then re-create from scratch or is there an alternative 'work-