Use the Constraint Editor to specify table constraints.
About Constraints |
In Oracle, a constraint is a rule applied to an object that restricts the data allowed in any instance of the object. The characteristics and usage of this database object are described in the Oracle documentation. |
|
Note:
|
Click Create a new constraint to open the New Constraint dialog.
Field | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Parent Schema | Select the parent schema for the new constraint. | ||||||||||
Parent Object | Select the parent object (table) for the new constraint. | ||||||||||
Name | Name the new constraint. | ||||||||||
Constraint Type |
|
More on the Constraint Type.
Type |
Action |
---|---|
Check |
Enter the check condition following Oracle syntax conventions. Example: (loc is not null) |
Primary Key |
Designate the column(s) to be used as the Unique, Primary Key, or Foreign key. To add columns to the constraint, use the arrow button to move one or more selected columns from the Available Table Columns pane to the Constraint Columns pane. The double arrow adds all available columns to the constraint. |
Unique | |
Foreign Key |
Note: Before selecting the On Delete Cascade property, be sure you understand the potential consequences of using this option. It could result in lost data. Consult your Oracle documentation for information about the DELETE CASCADE command. |
Icon | Tool Tip | Description |
---|---|---|
Generate SQL for changes |
Extract the DDL for the new constraint and place it into the Code Editor. | |
Revert to previous constraint |
Undo your entries without saving them. After saving your changes, you will not be able to use the Revert command. | |
Apply changes to DB |
Save your new constraint definition to the database. SQL Navigator generates the DDL and commits it to the database. | |
Enable current constraint |
This duplicates Enable/Disable Constraint on the Object Menu. |
Icon | Action | Description |
---|---|---|
From the Main Menu View Menu | Visual Object Editors | Constraint Editor |
Open the Constraint Editor. | |
From DB Navigator or Find objects Dialog Right click on a Constraint object and click Open. |
Open the selected Constraint object in the Constraint Editor. |
© ALL RIGHTS RESERVED. Conditions d’utilisation Confidentialité Cookie Preference Center