Chapter 2

Single-table queries

This chapter introduces you to the fundamentals of the SELECT statement, focusing for now on queries against a single table. The chapter starts by describing logical query processing—namely, the conceptual interpretation of queries. The chapter then covers other aspects of single-table queries, including predicates and operators, CASE expressions, NULLs, all-at-once operations, manipulating character data and date and time data, and querying metadata. Many of the code samples and exercises in this book use a sample database called TSQLV6. You can find the instructions for downloading and installing this sample database in the Appendix, “Getting started.”

Elements of the SELECT statement

The purpose of a SELECT ...

Get T-SQL Fundamentals, 4th 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.