FirebirdSQL logo
 DOMAININDEX 

Names for Constraints and Their Indexes

Constraints and their indexes are named automatically if no name was specified using the CONSTRAINT clause:

  • The constraint name has the form INTEG_n, where n represents one or more digits

  • The index name has the form RDB$PRIMARYn (for a primary key index), RDB$FOREIGNn (for a foreign key index) or RDB$n (for a unique key index).

Named Constraints

A constraint can be named explicitly if the CONSTRAINT clause is used for its definition.By default, the constraint index will have the same name as the constraint.If a different name is wanted for the constraint index, a USING clause can be included.