O'Reilly logo

SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition by Michael J. Hernandez, John L. Viescas

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

Using Expressions in a SELECT Clause

Knowing how to use expressions is arguably one of the most important concepts you’ll learn in this book. You’ll use expressions for a variety of purposes when working with SQL. For example, you would use an expression to

  • Create a calculated column in a query

  • Search for a specific column value

  • Filter the rows in a result set

  • Connect two tables in a JOIN operation

We’ll show you how to do this (and more) as we work through the rest of the book. We begin by showing you how to use basic expressions in a SELECT clause.

Note

Throughout this chapter, we use the “Request/Translation/Clean Up/SQL” technique introduced in Chapter 4.

You can use basic expressions in a SELECT clause to clarify information in a result set ...

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