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

Approximate Numerics:

  • REAL

  • DOUBLE PRECISION

  • FLOAT

Boolean:

  • BOOLEAN

Character Strings:

  • CHARACTER

  • CHARACTER VARYING (VARCHAR)

  • NATIONAL CHARACTER

  • NATIONAL CHARACTER VARYING

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

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus

SERIES
SQL All-in-One For Dummies Cheat Sheet

Advertisement

Inside Dummies.com