Condividi tramite


Setting Autoincrementing Field Values

You can turn on autoincrementing for fields of Integer type in a database container (DBC) or free table by using the Table Designer or the AUTOINC clause in the CREATE TABLE - SQL and ALTER TABLE - SQL commands. For more information about using the AUTOINC option, see CREATE TABLE - SQL Command and ALTER TABLE - SQL Command.

To enable autoincrementing for a new field using the Table Designer

  1. Create a new table, or open an existing table.
  2. In the Table Designer, click the Fields tab.
  3. Create the field for which you want to enable autoincrementing.
  4. In the Type drop-down list for the field, select Integer (AutoInc).
  5. In the AutoIncrement group box, choose a start value for Next Value and an increment value for Step.
  6. Create another field, if desired, or click OK to finish.

To enable autoincrementing for an existing field using the Table Designer

  1. Open an existing table.
  2. In the Table Designer, click the Fields tab.
  3. Select the field for which you want to enable autoincrementing.
  4. In the Type drop-down list for the field, select Integer (AutoInc).
  5. In the AutoIncrement group box, choose a start value for Next Value and an increment value for Step.
  6. Select another field for setting autoincrementing, if desired, or click OK to finish.

See Also

Field Creation | Autoincrementing Field Values in Tables | Fields Tab, Table Designer | Adding Fields | Editing Fields