Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The Oracle9i database introduced a new feature that allows you to define a default value for a column. For example, the following statement creates a table named order_status that has two columns named status and last_modified. The status column is defaulted to Order placed and the last_modified column is defaulted to the value returned by the SYSDATE function:
CREATE TABLE order_status (
order_status_id INTEGER
CONSTRAINT default_example_pk PRIMARY KEY,
status VARCHAR2(20) DEFAULT 'Order placed' NOT NULL,
last_modified DATE DEFAULT SYSDATE
);