Show TOC

Defining Constraints for ColumnsLocate this document in the navigation structure

Prerequisites

  • You are logged on to the database as a database user.

  • You have the ALTER privilege for the table to which the column belongs.

    More information: SQL Reference Manual, Privilege Specification (priv_spec)

  • Columns have been created for the table already.

  • The database is in the ONLINE operational state.

Context

A constraint for a column is an integrity condition that must be met by all column values.

Procedure

  1. Select the table in the explorer tree.
  2. In the context menu of the table, choose Definition.
  3. In the context menu of the editor window, choose Edit.
  4. Open the Constraints tab page.
  5. To define a new constraint, choose Add Constraint in the context menu of the editor window and enter the properties of the constraint.

    To change the definition of a constraint, overwrite the corresponding property in the editor window.

    More information:

    SQL Reference Manual,

  6. In the context menu of the editor window, choose Create Table (if you are creating a new table) or Alter Table (if the table already exists).

Next Steps

SQL Reference Manual, Constraint Definition (constraint_definition)