Oracle DML Data Types
Simple Datatypes
Internal Datatypes
- CHAR/NCHAR - fixed length string upto 2000 characters.
- VARCHAR/VARCHAR2/NVARCHAR2 - variable length string upto 4000 characters.
- DATE - fixed length, 7 byte date field. Default format is DD-MON-YY.
- NUMBER (p, s) - p represents precision or number of digits (excluding the decimal point) and s represents scale (number of digits after decimal point). Note that NUMBER declared without precision or scale is a floating point number and NUMBER(p) stores an integer into a floating point number. All numeric data in Oracle7 is stored internally as a modified floating point representation with the datatype NUMBER. A NUMBER datatype is signed (positive or negative), may contain upto 40 decimal digits and ranges from 10-63 to 10+63.
- FLOAT (n) - floating point number of a specified length.
- INTEGER (Oracle7) - an integer.
- SMALLINT (Oracle7) - a short integer.
- LONG - 2Gb variable length field. Superceded by the LOB datatypes.
External Datatypes
The LOB Datatypes
- BLOB - binary large object upto 4Gb for storing binary objects within the database. This is extremely inefficient. Use BFILE instead.
- CLOB - large string object upto 4Gb.
- NCLOB - multibyte character set string object datatype upto 4Gb.
- BFILE - externally stored and internally referenced binary file such as an image.
- RAW (Oracle7) - upto 4000 characters of binary data.Superceded by the LOB datatypes.
- LONG RAW (Oracle7) - binary data upto 2Gb. Superceded by the LOB datatypes.