Ispirer Website Ispirer Capabilities - Microsoft SQL Server Migration Free Trial

SQL Server Data Types - DECIMAL and NUMERIC

Versions: SQL Server 2008, 2005, 2000, 7.0 and 6.5

SQL Server - DECIMAL
Syntax DECIMAL[(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+1 to 1038-1, 1 ⇐ p ⇐ 38, 0 ⇐ s ⇐ p
Default p is 18, s is 0
Synonym DEC
Standards ANSI SQL

NUMERIC is identical to DECIMAL

SQL Server - NUMERIC
Standards ANSI SQL

SQL Server NUMERIC/DECIMAL - Equivalents in Other Databases

Database Data Type and Conversion
Oracle NUMBER(p,s), 1 ⇐ p ⇐ 38, -84 ⇐ s ⇐ 127
MySQL DECIMAL(p,s,), NUMERIC(p,s), 1 ⇐ p ⇐ 65, 0 ⇐ s ⇐ 30
PostgreSQL DECIMAL(p,s), NUMERIC(p,s), 1 ⇐ p ⇐ 1000, 0 ⇐ s ⇐ p
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 SQL Server

Data Types
Integers BIGINT INT SMALLINT TINYINT
Floating-point FLOAT(p) REAL DOUBLE PRECISION

All Data Types


© 1999-2024, Ispirer Systems, LLC. All Rights Reserved.