O'Reilly logo

Joe Celko's SQL for Smarties, 4th Edition by Joe Celko

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

10

Numeric Data Types

SQL is not a computational language; the arithmetic capability of SQL is weaker than that of any other high-level programming language you have ever used. But there are some tricks that you need to know working with numbers in SQL and when passing them to a host program. Much of the arithmetic and the functions are implementation-defined, so you should experiment with your particular product and make notes on the defaults, precision, and tools in the math library of your database.

This section deals with the arithmetic that you would use across a row instead of down a column; they are not quite the same.

10.1 Numeric Types

The SQL standard has a very wide range of numeric types. The idea is that any host language can find an ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required