December 2002
Intermediate to advanced
928 pages
85h 29m
English
The datatype in a declaration can be constrained or unconstrained. Constrained datatypes have a size, scale, or precision limit that is less than the unconstrained datatype. For example:
total_sales NUMBER(15,2); -- Constrained. emp_id VARCHAR2(9); -- Constrained. company_number NUMBER; -- Unconstrained. book_title VARCHAR2; -- Not valid.
Constrained declarations require less memory than unconstrained declarations. Not all datatypes can be specified as unconstrained. You cannot, for example, declare a variable to be of type VARCHAR2—you must declare the maximum size of this datatype.