FirebirdSQL logo
 DOMAININDEX 

GENERATED ALWAYS

An identity column of type GENERATED ALWAYS will always generate a column value on insert.Explicitly inserting a value into a column of this type is not allowed, unless:

  1. the specified value is DEFAULT;this generates the identity value as normal.

  2. the OVERRIDING SYSTEM VALUE clause is specified in the INSERT statement;this allows a user value to be inserted;

  3. the OVERRIDING USER VALUE clause is specified in the INSERT statement;this allows a user specified value to be ignored (though in general it makes more sense to not include the column in the INSERT).

GENERATED BY DEFAULT

An identity column of type GENERATED BY DEFAULT will generate a value on insert if no value — other than DEFAULT — is specified on insert.When the OVERRIDING USER VALUE clause is specified in the INSERT statement, the user-provided value is ignored, and an identity value is generated (as if the column was not included in the insert, or the value DEFAULT was specified).