7

For instance, something equivalent to

CREATE INDEX Listing_Date_Idx ON ACTIVITY(Listing,Date_ DESC,Time_ DESC);
MDCCL
  • 8,530
  • 3
  • 32
  • 63
Alister
  • 173
  • 4

1 Answers1

6

The syntax for index creation does not allow for this:

CREATE [UNIQUE] [ASC[ENDING] | [DESC[ENDING]] INDEX indexname
   ON tablename
   { (<col> [, <col> ...]) | COMPUTED BY (expression) }

<col> ::= a column not of type ARRAY, BLOB or COMPUTED BY

As you must set a single order for the entire index, not for each individual column.

However,

It is quite valid to define both an ascending and a descending index on the same column or key set.

Mark Rotteveel
  • 1,236
  • 7
  • 17
LowlyDBA - John M
  • 11,059
  • 11
  • 45
  • 63