create table employee
( id number(7) PRIMARY KEY,
name varchar2(30),
salary number(8,2)
)
When I use SQL Plus: describe employee, the correct column definition is returned.
However, if I query from the user_tab_columns (or col) table/view, the data_length of the number fields is incorrect.
The data_length for columns
with data type "number" is always 22. Thus number(8,2) becomes number(22)
and number(7) becomes number(22).
I think the data_length of
22 represents the maximum size of a variable length numeric column. Note
that ALL numeric columns are variable length in Oracle.