Choosing Datatypes

The datatype of a column specifies what kind of information the column will hold (characters, numbers, dates, and so on) so that the system will know how the data is to be physically stored and how it can be manipulated. For example, a character datatype holds letters, numbers, and special characters, while an integer datatype holds whole numbers only. Data in integer columns can be manipulated with arithmetic operators, while character data cannot.

Relational systems can handle a wide variety of datatypes, but be careful in making assumptions—even when two systems use the same datatype name, their meanings may be different. You'll want to check your system's reference manuals to find out what datatypes are available to you ...

Get Practical SQL Handbook, The: Using SQL Variants, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.