Chapter 7. Specifying Values

This book emphasizes the importance of database structure for maintaining database integrity. Although the significance of database structure is often overlooked, you must never forget that the most important thing is the data itself. After all, the values held in the cells that form the intersections of the database table's rows and columns are the raw materials from which you can derive meaningful relationships and trends.

You can represent values in several ways. You can represent them directly, or you can derive them with functions or expressions. This chapter describes the various kinds of values, as well as functions and expressions.


Functions examine data and calculate a value based on the data. Expressions are combinations of data items that SQL evaluates to produce a single value.


SQL recognizes several kinds of values:

  • Row values

  • Literal values

  • Variables

  • Special variables

  • Column references

Get SQL For Dummies®, 7th Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.