Setting Column Options |
You can set a variety of column options to meet your data requirements. The settings follow:
Name: Lets you specify a column name.
Type: Lets you specify the following data types: BINARY, CHAR, NCHAR, DATE, DECIMAL, DOUBLE, FILE, FLOAT, INTEGER, LONG VARBINARY, LONG VARCHAR, OID, SERIAL, SMALLINT, TIME, TIMESTAMP, VARCHAR, NVARCHAR , DOMAIN, BLOB, CLOB, and NCLOB. For complete descriptions of the data types, refer to the SQL Command and Function Reference.
Precision: Lets you specify the length of the columns. This is necessary for the following data types that have variable length: VARCHAR, NVARCHAR, CHAR, NCHAR, DECIMAL, SERIAL, and BINARY.
Scale: Lets you specify the scale of the data type. This is required if you specify the DECIMAL data type.
Nullable: Lets you restrict or permit null values on your columns. By specifying NOT NULL, null values cannot be added to the column. By default, the column is set as null. NOT NULL is usually specified for primary key columns.
Primary Key: Lets you specify a column as a primary key in a table.
Default Value: Lets you specify a default value for the column data.
Related topic:
Creating
a Table
Setting Table, Tablespace, and Schema Options
Setting Column and Table Constraints