Subject Re: [firebird-support] Max columns in Unique Constraint
Author Helen Borrie
At 08:52 AM 5/09/2007, you wrote:
>What is the maximum number of fields that can be included in a unique
>constraint? Or is the limit based on the length of the included

Yes - it is limited by the maximum total length of the keys
participating in the unique index that is autocreated to enforce the

>I am using Super Server v2.0.1.

For a database with ODS 11 or higher, depends on page size, character
set and collation order. The max is in bytes, it is one-quarter of
page size. Plain ascii with the default collation (binary) gives the
maximum capacity where character fields are in the keys. Complex
collation orders and/or MBCS reduce the capacity.

For a database < ODS 11, theoretical max is 252 bytes, less the
reductions for complex collation orders and/or MBCS.