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 ...
Get SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second 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.