Chapter 8

Specifying Values

In This Chapter

arrow Using variables to eliminate redundant coding

arrow Extracting frequently required information from a database table field

arrow Combining simple values to form complex expressions

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.

remember.eps 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 ...

Get SQL For Dummies, 8th 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.