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.

Note

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.

Values

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 books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.