SQL All-in-One For Dummies
Book image
Explore Book Buy On Amazon
Depending on their histories, different SQL implementations support a variety of data types. The SQL specification recognizes nine predefined general types, shown in the lists below.

Exact Numerics:

  • INTEGER

  • SMALLINT

  • BIGINT

  • NUMERIC

  • DECIMAL

  • DECFLOAT
Approximate Numerics:
  • REAL

  • DOUBLE PRECISION

  • FLOAT

Boolean:
  • BOOLEAN

Character Strings:
  • CHARACTER (CHAR)

  • CHARACTER VARYING (VARCHAR)

  • NATIONAL CHARACTER (NCHAR)

  • NATIONAL CHARACTER VARYING (NVARCHAR)

Datetimes:
  • DATE

  • TIME

  • TIMESTAMP

  • TIME WITH TIMEZONE

  • TIMESTAMP WITH TIMEZONE

Intervals:
  • INTERVAL DAY

  • INTERVAL YEAR

Large Objects:
  • BLOB

  • CLOB

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 40-year veteran of the computer industry and the author of more than 40 books, including SQL For Dummies and Database Development For Dummies. For the latest news on Allen's activities, check out his online courses (at pioneer-academy1.teachable.com) and his blog (at www.allengtaylor.com). You can contact Allen at [email protected].

This article can be found in the category: