Columns
In this window, you can specify properties for each column in the table.
By default, the General tab is displayed.
General Tab
In this tab, you can add or delete a column. Click + Add to add a new column or click X Delete Selected to delete the selected column. You can also designate a column as a Primary Key by selecting the corresponding PK checkbox, or set it as an identity column by selecting the Identity Column checkbox. When you select a column from the list, you can customize its properties, such as data type, default value, expression, and comments, using the fields that appear below the column list.
-
Name: The name of the column. By default, the new column is named as COLUMN_1. You can double-click the column cell to edit its value.
-
Data Type: Data type of the column. Most of the remaining information depends on the specific type.
-
Size: For character data, the maximum size of the column data. This field is displayed when VARCHAR2 data type is selected.
-
Units: For character data, the units represented by the Size:
BYTEfor bytes orCHARfor characters. This attribute is important if the database contains data in Unicode format, with multiple bytes for each character. This field is displayed when VARCHAR2 data type is selected. -
Precision: For numeric data, the precision (total number of significant digits that can be represented) of the column data. This field is displayed when NUMBER data type is selected.
-
Scale: For numeric data, the scale (number of digits after the decimal point) of the column data. This field is displayed when NUMBER data type is selected.
-
Default: For relevant types, the default value inserted into the column if no value is specified when a row is inserted.
-
Default on Null: If this option is selected, then the default value is inserted when no value is provided in the column.
-
Expression: When an expression is specified, the column value is automatically generated according to the logic you provide, rather than being directly entered or modified by users.
-
Comments: Optional descriptive comment about the column.
Click Apply to save your changes.
Constraints Tab
Select the Constraints tab to view and edit constraints for your table columns.
-
Not Null Constraint
For each column, select the Not Null checkbox if the column should not allow NULL values. You can also provide a custom name for the NOT NULL constraint in the Not Null Name field.
-
Check Constraint
To add additional validation rules, select a column and use the Check Constraint section to define custom constraints, such as specifying allowed value ranges or patterns. You can enter a constraint name and logic in the provided fields.
-
Additional Constraint Options
At the bottom of the tab, you can further configure constraint behavior by enabling or disabling the constraint, setting it as deferrable, determining if it should be enforced immediately, and enabling validation. These options help you control how and when the constraints are applied to your table data.
Click Apply to save your changes.
Identity Column Tab
In this tab, you can configure automatic value generation for a specific column, typically used for unique identifiers like primary keys. In this tab, you can specify how the identity values should be generated, including options for the starting value, increment step, minimum and maximum values, caching behavior, cycling, and ordering.
-
Generate: Options to set whether the value should be provided BY DEFAULT or ALWAYS.
-
Start With: Initial value for the column.
-
Increment By: Step size between generated values.
-
Min Value-Max Value: Allowable range for generated numbers.
-
Cache and Cache Size: Cache causes sequence values are preallocated in cache, which can improve application performance. Cache size indicates the number of sequence values preallocated in cache. No Cache causes sequence values not to be preallocated in cache.
-
Cycle: Indicates whether the sequence wraps around to reuse numbers after reaching its maximum value or its minimum value. If cycling of values is not enabled, the sequence cannot generate more values after reaching its maximum or minimum value.
-
Order: Indicates whether sequence numbers are generated in the order in which they are requested. If No Order is specified, sequence numbers are not guaranteed to be in the order in which they were requested.
Click Apply to save your changes.