Part II. Manipulating Data with Select
In This Part
Understanding Basic Query Flow
Using Expressions and Scalar Functions
Merging Data with Joins and Unions
Including Data with Subqueries and CTEs
Aggregating Data
Navigating Hierarchical Data
Using Full-Text Search
Creating Views
Working with Distributed Queries
Modifying Data
Select
is the most powerful word in SQL. 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
, and delete
verbs to modify data. SQL Server even extends the select
command with XQuery, covered in Chapter 31.
Part II begins by exploring the basic logical query flow, and quickly digs deeper into topics such as relational division, correlated subqueries, set-difference queries, and distributed queries. I've devoted ten chapters to the select
command because understanding the multiple options and creative techniques available with queries is key to becoming a successful SQL Server developer, DBA, or architect.
Please don't assume that Part II is only for beginners. These ten chapters present the core power of SQL. Part VI explores optimization, and it may be tempting to go straight there for optimization ideas, but the second strategy of optimization ...
Get SQL Server™ 2005 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.