FirebirdSQL logo
 DOMAININDEX 

Identity Type

The SET GENERATED {ALWAYS | BY DEFAULT} changes an identity column from ALWAYS to BY DEFAULT and vice versa.It is not possible to use this to change a regular column to an identity column.

RESTART

The RESTART clause restarts the sequence used for generating identity values.If only the RESTART clause is specified, then the sequence resets to the initial value specified when the identity column was defined.If the optional WITH restart_value clause is specified, the sequence will restart with the specified value.

Note

In Firebird 3.0, RESTART WITH restart_value would also change the configured initial value to restart_value.This was not compliant with the SQL standard, so since Firebird 4.0, RESTART WITH restart_value will only restart the sequence with the specified value.Subsequent RESTARTs (without WITH) will use the START WITH value specified when the identity column was defined.

It is currently not possible to change the configured start value.