3.1. Numeric Types
The SQL Standard has a wide range of numeric types. The idea is that any host language can find an SQL numeric type that matches one of its own.
You will also find some vendor extensions in the numeric data types, the most common of which is MONEY. This is really a DECIMAL or NUMERIC data type, which also accepts and displays currency symbols in input and output.
Numbers in SQL are classified as either exact or approximate. An exact numeric value has a precision, p, and a scale, s. The precision is a positive integer that determines the number of significant digits in a particular radix. The Standard says the radix can be either binary or decimal, so you need to know what your implementation does. The scale is a nonnegative ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access