O'Reilly logo

Joe Celko's SQL for Smarties, 5th 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

Chapter 10

Numeric Data in SQL

Abstract

SQL is not a computational language; the arithmetic capability of the SQL is weaker than that of almost any other 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.

Keywords

NULL

Exact numeric data types

INTEGER

BIGINT

SMALLINT

NUMERIC(p, s)

DECIMAL (p, s)

BIT

Byte

BOOLEAN

Approximate numeric FLOAT(p)

REAL

DOUBLE PRECISION

IEEE floating point

Type conversions

INCITS/H2 Database Standards Committee

NULLIF()

COALESCE()

Mathematical functions

MOD()

IP addresses

Sql is not a computational language; the arithmetic capability of the SQL is weaker than that of almost any other language you have ever used. But there ...

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