Check Constraints Wizard (PostgreSQL)
Go Up to PostgreSQL Object Wizards
This wizard lets you build and submit an ALTER TABLE... ADD CONSTRAINT... CHECK... statement, adding a constraint to an existing table.
To create a new check constraint using a wizard:
- Open a creation wizard for a check constraint. For details, see Opening an Object Wizard.
- Use the following topics as a guide to setting properties and performing tasks as you pass through the wizard panels:
- Properties panel - Check Constraints (PostgreSQL) - Properties.
- Definition panel - for details, see Previewing the DDL Generated to Create the New Object.
- Finally, use the Execute button to create the object.
Check Constraints (PostgreSQL) - Properties
When creating or editing a check constraint, this tab/panel lets you work with the following settings:
Setting | Description |
---|---|
Table Schema and Table Name |
Identify the table for which the constraint is being created. |
Name |
Lets you type the name of the constraint. |
No Inherit |
If selected, a NO INHERIT parameter is added to the generated ALTER TABLE statement, letting you create a non-inherited check constraint. |
Is Validated |
If not selected, a NOT VALID parameter is added to the generated ALTER TABLE statement, letting you ensure that initial check to verify that all rows satisfy the constraint is not executed. |
Check Condition |
Type the check constraint condition. As a convenience, use the Table Columns button to paste in column names as part of the condition. |