Inside Microsoft SQL server 2005 : T-SQL querying - Ben-Gan, Itzik (Microsoft Press, 2006)
This thorough, hands-on reference for database developers and administrators delivers expert guidance on sophisticated uses of Transact-SQL (T-SQL) - one of the most familiar and powerful programming languages for SQL Server. Written by a T-SQL guru, this guide focuses on advanced querying techniques and how queries are interpreted and processed by the SQL Server execution engine. You'll get in-depth coverage of the sophisticated uses of T-SQL, including the differences between logical and physical processing, nesting of queries, and much more. The book explains and compares solutions to database-development problems in both SQL Server 2000 and SQL Server 2005, discussing the new T-SQL programming features added to SQL Server 2005 in detail. Includes extensive code samples, table examples, and logic puzzles to help database developers and administrators understand the intricacies and help promote mastery of T-SQL.