O'Reilly logo

SQL: Visual QuickStart Guide by Chris Fehily

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

Data Types

Recall from “Tables, Columns, and Rows” in Chapter 2 that a column’s domain constrains the values that can be stored in the column. You can use a column’s data type for this purpose. A data type has these characteristics:

  • Each column in a table has a single data type.

  • A data type falls into one of categories listed in Table 3.4 (covered in the next six sections).

  • The data type determines a column’s allowable values and the operations it supports. An integer data type, for example, can represent any whole number between certain DBMS-defined limits and supports the usual arithmetic operations: addition, subtraction, multiplication, and division (among others). But an integer can’t represent a nonnumeric value such as ’schadenfreude’ and ...

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