Subject Re: [firebird-support] Where to collate?
Author Ann W. Harrison
Juan Pedro López Sáez wrote:
>
> Just a simple question: what are the differences between adding a
> collate clause in a column definition (this column will be indexed to
> improve sorted operations) or adding the collate definition in the ORDER
> BY query?

Put the collate on the column definition. Indexes are for locating
records. If you use an index to retrieve a range of records, the index
must have the order (collation) you expect or you'll get wrong results.

The collation name is allowed on the order by clause so that you can
force a different ordering for a particular statement.

Regards,


Ann