Columns
Create
- Go to the Columns tab in the Properties editor, right-click on the pane of the object's sub-entities, and select Create New Column from the context menu.
- You can also add a new column by expanding the table view in the Database Navigator and selecting Create New Column from the context menu.
-
Additionally, to create a new column, you can utilize the Create New Column button
located at the bottom of the Editor panel.
-
Customize a column's settings in the Edit Attribute window. Adjust the Name, Data type, Identity, Collation, Not null, Default value, and add a Comment as needed.
- Persist the changes.
Modify
Go to the Database Navigator menu, and choose the right database and column to modify its settings. Right-click the column and select View Column.
You can rename the column, change its data type, tweak the Not Null option, adjust permissions, and add comments.
Note: not all databases support the ability to modify columns.
Delete
To delete a column, right-click on the column's name in the Database Navigator and select Delete, or you can select the necessary column and press the Delete key.
Tip: Before deleting a primary key column, remove its constraint within the table properties before deleting it.
Restrictions
- Data Type: Each column in a table has a specific data type. The type of data that can be stored in a column is dictated by its data type.
- Nullability: By default, columns can hold NULL. However, by specifying NOT NULL during column creation, you can enforce that every row must contain a value for that column.
- Unique Constraint: A unique constraint ensures that all values in a column are distinct. Duplicate entries are not permitted.
- Check Constraint: A check constraint enables you to specify a condition on a column. Every value added to the column must satisfy this condition.
- Default Value: A column can be given a default value. If no value is specified during data insertion, the column uses the default.
Remember, these restrictions are essential to ensure data integrity, accuracy, and reliability in your database.