Home

SQL Data Types

|
|  Updated:  
2022-09-30 20:09:43
SQL Essentials For Dummies
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 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.