The SERIAL data type stores a sequential integer, in the positive range of the INT8 data type, that is automatically assigned by the database server when a new row is inserted. A table can have no more than one SERIAL column, but it can have one SERI...
显示全部The SERIAL data type stores a sequential integer, in the positive range of the INT8 data type, that is automatically assigned by the database server when a new row is inserted. A table can have no more than one SERIAL column, but it can have one SERIAL and one SERIAL8 column.
SERIAL values in a column are not automatically unique. You must apply a unique index or primary key constraint to this column to prevent duplicate serial numbers. If you use the interactive schema editor in DB–Access to define the table, a unique index is applied automatically to a SERIAL column.
SERIAL numbers might not be consecutive, because of concurrent users, rollbacks, and other factors.
收起