Numeric Datatypes

Numeric datatypes store numbers. Most DBMS' support multiple numeric datatypes, each with a different range of numbers that can be stored in it. Obviously, the larger the supported range, the more storage space needed. In addition, some numeric datatypes support the use of decimal points (and fractional numbers) whereas others support only whole numbers. Table D.2 lists common uses for various datatypes, not all DBMS' follow the exact naming conventions and descriptions listed here.

Table D.2. Numeric Datatypes
DatatypeDescription
BITSingle bit value, either 0 or 1, used primarily for on/off flags
DECIMAL (also called NUMERIC)Fixed or floating point values with varying levels of precision
FLOAT (also called NUMBER)Floating point ...

Get Sams Teach Yourself SQL in 10 Minutes, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.