O'Reilly logo

SQL All-in-One For Dummies®, 2nd Edition by Allen G. Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 1: Values, Variables, Functions, and Expressions

In This Chapter

arrow Discovering valid values for table columns

arrow Summarizing data with set functions

arrow Dissecting data with value functions

arrow 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. Rather than 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. (Refer to Book I, Chapter 6 for coverage of those 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

I discuss each in turn throughout this section.

Row values have multiple parts

A row value includes the values of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required