Chapter 3

Values, Variables, Functions, and Expressions

IN THIS CHAPTER

Bullet Discovering valid values for table columns

Bullet Summarizing data with set functions

Bullet Dissecting data with value functions

Bullet Converting data types

This chapter describes the tools that ISO/IEC standard SQL provides to operate on data. In addition to specifying the value of a data item, you can slice and dice an item in a variety of ways. Instead of just retrieving raw data as it exists in the database, you can preprocess it to deliver just the information you want, in the form that you want it.

Entering Data Values

After you’ve created a database table, the next step is to enter data into it. SQL supports a number of different data types. Within any specific data type, the data can take any of several forms. The five different forms that can appear in table rows are

  • Row values
  • Column references
  • Literal values
  • Variables
  • Special variables

Each form is discussed in turn throughout this section.

Row values have multiple parts

A row value includes the values of all the data in all the columns in a row in a table. It ...

Get Data Analytics & Visualization All-in-One For Dummies 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.