2 Day Developer > Managing Database Objects > Managing Tables > Adding a Check Constraint
Adding a Check Constraint |
Previous |
Next |
You can use Object Browser to add a constraint to a table after it has been created. In the personal_info
table, you might want to check that the number of dependents claimed is always greater than 0
. For information about the check constraint, see "Check Constraint".
To add a check constraint:
Log in to the Database Home Page. See "Logging in to the Database Home Page".
On the Database Home Page, click the Object Browser icon.
In the Object list, select Tables then click the personal_info
table that you previously created.
Click the Constraints tab.
Click the Create button.
On the Add Constraint page, use the following information to complete the page.
PERSONAL_INFO_CHECK_CON
Check
DEPENDENTS_CLAIMED(NUMBER)
> 0
Click the Next button.
Click the Finish button to complete the action.