Here’s a list of all the formal data types that ISO/IEC standard SQL recognizes. In addition to these, you may define additional data types that are derived from these.

Exact Numerics:

  • INTEGER

  • SMALLINT

  • BIGINT

  • NUMERIC

  • DECIMAL

Approximate Numerics:
  • REAL

  • DOUBLE PRECISION

  • FLOAT

  • DECFLOAT
Binary Strings:
  • BINARY

  • BINARY VARYING

  • BINARY LARGE OBJECT

Boolean:
  • BOOLEAN

Character Strings:
  • CHARACTER

  • CHARACTER VARYING (VARCHAR)

  • CHARACTER LARGE OBJECT

  • NATIONAL CHARACTER

  • NATIONAL CHARACTER VARYING

  • NATIONAL CHARACTER LARGE OBJECT

Datetimes:
  • DATE

  • TIME WITHOUT TIMEZONE

  • TIMESTAMP WITHOUT TIMEZONE

  • TIME WITH TIMEZONE

  • TIMESTAMP WITH TIMEZONE

Intervals:
  • INTERVAL DAY

  • INTERVAL YEAR

Collection Types:
  • ARRAY

  • MULTISET

Other Types:
  • ROW

  • XML

About This Article

This article is from the book:

About the book author:

Allen G. Taylor is a 30-year veteran of the computer industry and the author of over 40 books, including SQL For Dummies and Crystal Reports For Dummies. He lectures nationally on databases, innovation, and entrepreneurship. He also teaches database development internationally through a leading online education provider.

This article can be found in the category: