The "typical" SQL DBMS supports most of the standard numeric data types, but often uses preferred local names. Here are some lists of local types derived from vendor manuals. The correlation with the leftmost ("Standard") column is sometimes imprecise. "ODBC" is not a DBMS but a spec.
| Standard | Oracle | DB2 | Sybase | ODBC |
|---|---|---|---|---|
| SMALLINT | NUMBER | SMALLINT | SMALLINT | SMALLINT |
| INTEGER | NUMBER | INTEGER | INT | INTEGER |
| DECIMAL | NUMBER | DECIMAL | MONEY | DECIMAL |
| NUMERIC | NUMBER | NUMERIC | MONEY | NUMERIC |
| REAL | NUMBER | REAL | FLOAT | REAL |
| FLOAT | NUMBER | FLOAT | FLOAT | FLOAT |
| DOUBLE PRECISION | NUMBER | DOUBLE PRECISION | FLOAT | DOUBLE PRECISION |
Other commonly-seen numeric data types include TINYINT (8-bit signed integer), BIGINT (64-bit signed integer) and SERIAL (integer that goes up by 1 for each new inserted row).
Note:
Portions of the text in this entry are Copyright © 1999 by Ocelot Computer Services Incorporated. Used by permission.
Comments
Comments loading...