Data Type | Range or List of Values |
Integer Numeric Types | |
BIT | 0 or 1 |
TINYINT | -128 to 127 |
SMALLINT | -32768 to 32767 |
INTEGER | -231 to +231 - 1 |
INT | An alias for INTEGER |
BIGINT | -263 to +263 - 1 |
Non-integer Numeric Types | |
FLOAT | Approximately 7-digit-precision floating point |
REAL | An alias for FLOAT |
DOUBLE | Approximately 17-digit-precision floating point |
DECIMAL[(p,s)] | Fixed precision number with up to p (precision) digits total and up to s (scale) digits to the right of the decimal point. Default: DECIMAL(32,2). |
NUMERIC[(p,s)] | Same as DECIMAL, except default is NUMERIC(32,0) |
Date and Time Types | |
DATE | |
TIME | |
TIMESTAMP | |
String and Binary Types | |
CHAR[(n)] | Character string of exactly n characters, padded with spaces. Default for n: 255. |
VARCHAR[(n)] Also, CLOB | Unpadded character string of up to n characters. Default for n: 255. |
BINARY[(n)] | Binary string of exactly n bytes, right-padded as necessary with bytes of zeroes. Default for n: 255. |
VARBINARY(n) Also, BLOB | Unpadded binary string of up to n bytes. Default for n: 255. |
Other Types | |
BOOLEAN | A value of TRUE or FALSE. (‘BOOLEAN’ is not a valid value.) |
CURSOR | An untyped cursor (because no list of fields is provided) |
CURSOR(...) | A cursor defined as a set of fields (‘columns’) |
CURSOR(rowType) | A CURSOR declared by referencing a ROW type (instead of specifying fields directly) |
ROW(...) | A set of fields (also called ‘columns’) |
XML [ ( { DOCUMENT | CONTENT | SEQUENCE } [ ( ANY | UNTYPED | XMLSCHEMA schema-details ) ] ) ] schema-details: URI target-namespace-uri [ LOCATION schema-location ] [ { ELEMENT element-name | NAMESPACE namespace-uri [ ELEMENT element-name ] } ] | NO NAMESPACE [ LOCATION schema-location ] [ { ELEMENT element-name | NAMESPACE namespace-uri [ ELEMENT element-name ] } ] | An XMLvalue. Default: ‘No Schema.’ • target-namespace-uri: a string literal that represents a valid URI • schema-location: a string literal that represents a valid URI • namespace-uri: a string literal that represents a valid URI • element-name: any valid identifier |