Part II. Manipulating Data with Select

IN THIS PART

SQL is like algebra in action.

The etymology of the word "algebra" goes back to the Arabic word "al-jabr," meaning "the reunion of broken parts," or literally, "to set a broken bone." Both algebra and SQL piece together fragments to solve a problem.

I believe select is the most powerful word in all of computer science. Because select is so common, it's easy to take it for granted, but no keyword in any programming language I can think of is as powerful and flexible. Select can retrieve, twist, shape, join, and group data in nearly any way imaginable, and it's easily extended with the insert, update, delete (and now merge!) commands to modify data.

Part II begins by exploring the basic logical query flow and quickly digs deeper into topics such as aggregate queries, relational division, correlated subqueries, and set-difference queries. I've devoted 15 chapters to the select command and its variations because understanding the multiple options and creative techniques available with queries is critical to becoming a successful SQL Server developer, DBA, or architect.

Please don't assume ...

Get Microsoft® SQL Server® 2008 Bible 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.