Summary

This chapter concentrates on the basic clauses of the SELECT statement. Now you are familiar with the SELECT statement basics. These include:

  • Using the asterisk for all columns in CREATE TABLE order, or listing individual column names, in any order, for a tailored report. You've also learned how to modify display labels, add text, and perform calculations in the SELECT clause.

  • Specifying tables in the FROM clause, and assigning aliases as needed.

  • Selecting rows in the WHERE clause, using comparison operators, logical operators, IN, IS NULL, and BETWEEN to zero in on just the values you want.

The next chapter covers some refinements on selection: ordering results with ORDER BY, eliminating duplicates in results with DISTINCT, and using aggregate ...

Get Practical SQL Handbook, The: Using SQL Variants, Fourth 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.