Ispirer Website
Ispirer Capabilities - PostgreSQL Migration
Free Trial
PostgreSQL Data Types - NUMERIC and DECIMAL
Versions: PostgreSQL 8.x and 7.x
PostgreSQL - NUMERIC | |
---|---|
Syntax | NUMERIC[(p[,s])] |
Data | Fixed-point numeric data |
Parameters | p is the maximum number of all digits (both sides of the decimal point), s is the maximum number of digits after the decimal point |
Range | -1038 to 1038-1, 1 ⇐ p ⇐ 1000, 0 ⇐ s ⇐ p |
Default | p is 1000, s is 0 |
Error Handling | If the scale of a value is greater than the declared scale, it is rounded to the specified number of fractional digits |
Special Values | The special case-insensitive value 'NaN' (not-a-number) is allowed |
Standards | ANSI SQL |
DECIMAL is identical to NUMERIC
PostgreSQL - DECIMAL | |
---|---|
Standards | ANSI SQL |
PostgreSQL NUMERIC/DECIMAL - Equivalents in Other Databases
Database | Data Type and Conversion |
---|---|
Oracle | NUMBER(p,s), 1 ⇐ p ⇐ 38, -84 ⇐ s ⇐ 127 |
SQL Server | DECIMAL(p,s), NUMERIC(p,s), 1 ⇐ p ⇐ 38, 0 ⇐ s ⇐ p |
MySQL | DECIMAL(p,s), NUMERIC(p,s), 1 ⇐ p ⇐ 65, 0 ⇐ s ⇐ 30 |
Sybase ASE | DECIMAL(p,s), NUMERIC(p,s), 1 ⇐ p ⇐ 38, 0 ⇐ s ⇐ p |
Informix | DECIMAL(p,s), NUMERIC(p,s), 1 ⇐ p ⇐ 32, 0 ⇐ s ⇐ p |
HP Neoview | DECIMAL(p,s), 1 ⇐ p ⇐ 18, 0 ⇐ s ⇐ p, NUMERIC(p,s), 1 ⇐ p ⇐ 128, 0 ⇐ s ⇐ p |
Ingres | DECIMAL(p,s), NUMERIC(p,s), 1 ⇐ p ⇐ 39, 0 ⇐ s ⇐ p |
Related Data Types in PostgreSQL
All Data Types