Start reading Inside Microsoft® SQL Server® 2008: T-SQL Querying: T-SQL... on the free Kindle Reading App or on your Kindle in under a minute. Don't have a Kindle? Get your Kindle here.
Programming Books C Java PHP Python Learn more Browse Programming Books
This title is not currently available for purchase
Sorry, this item is not available in
Image not available for
Image not available

To view this video download Flash Player


Inside Microsoft® SQL Server® 2008: T-SQL Querying: T-SQL Querying (Developer Reference) [Kindle Edition]

Itzik Ben-Gan , Dejan Sarka , Lubor Kollar , Steve Kass
4.5 out of 5 stars  See all reviews (22 customer reviews)

Pricing information not available.

Free Kindle Reading App Anybody can read Kindle books—even without a Kindle device—with the FREE Kindle app for smartphones, tablets and computers.

To get the free app, enter your email address or mobile phone number.


Amazon Price New from Used from
Kindle Edition $22.99  
Paperback $33.59  
Shop the new
New! Introducing the, a hub for Software Developers and Architects, Networking Administrators, TPMs, and other technology professionals to find highly-rated and highly-relevant career resources. Shop books on programming and big data, or read this week's blog posts by authors and thought-leaders in the tech industry. > Shop now
This title is not available for Kindle 1st generation devices, but is available for newer Kindle devices and free Kindle reading applications.

Book Description

Tackle the toughest set-based querying and query tuning problems—guided by an author team with in-depth, inside knowledge of T-SQL. Deepen your understanding of architecture and internals—and gain practical approaches and advanced techniques to optimize your code’s performance.

Discover how to:

  • Move from procedural programming to the language of sets and logic

  • Optimize query tuning with a top-down methodology

  • Assess algorithmic complexity to predict performance

  • Compare data-aggregation techniques, including new grouping sets

  • Manage data modification—insert, delete, update, merge—for performance

  • Write more efficient queries against partitioned tables

  • Work with graphs, trees, hierarchies, and recursive queries

  • Plus—Use pure-logic puzzles to sharpen your problem-solving skills

Editorial Reviews

About the Author

Steve Kass, PhD, is an MVP for SQL Server and a professor of mathematics and computer science. He has written for SQL Server Magazine and spoken at SQL Server Magazine Connections events.

Product Details

  • File Size: 4767 KB
  • Print Length: 832 pages
  • Simultaneous Device Usage: Unlimited
  • Publisher: Microsoft Press; 1 edition (November 30, 2009)
  • Language: English
  • ASIN: B0043EWUUW
  • Text-to-Speech: Enabled
  • X-Ray:
  • Word Wise: Not Enabled
  • Lending: Not Enabled
  • Amazon Best Sellers Rank: #742,356 Paid in Kindle Store (See Top 100 Paid in Kindle Store)
  •  Would you like to give feedback on images?

Customer Reviews

Most Helpful Customer Reviews
53 of 62 people found the following review helpful
By Jose
I just went yesterday to a famous bookstore here in town to check this one before order it online and left a bit disappointed, with no desire at all to buy it. Don't get me wrong, Itzik is an awesome writer, a genius on his field, but I do not share the previous 5 start opinions and I will explain why.

I do not consider myself an TSQL expert but got some SQL DBA years on my belt and a MCTS cert too. Having said that and after almost finish reading Microsoft SQL Server 2008 T-SQL Fundamentals (PRO-Developer), same author, I found this one very difficult to follow, flooded with tons of theory and math that for a TSQL book is in my opinion too much. Yes, SQL language has strong logic and math background but that is not what DBAs or developers are looking on a technical book and this is not a college book either; people are looking for practical books which can be quickly be applied on daily job activities.

Chapter #2 for example is full of logic and math stuff that I honestly skipped immediately. Nice as bonus information but not "straight to the point" T-SQL stuff. You can easily take that chapter out and keep the book lighter in my honest opinion. Same for Chapter#3, more logic and math stuff, related to T-SQL, yes, but no the real stuff.

Chapter 1, 7 and 10 are taken of Microsoft SQL Server 2008 T-SQL Fundamentals (PRO-Developer), which by the way, is an outstanding book. Those chapters are about SELECT, JOINS and DML, information that like I said, can be found on the Fundamentals book but in an easy to read style, even with exercises so you can evaluate your own skills.

Chapter #4 is probably the more interesting chapter of the whole book, is about query performance.
Read more ›
Was this review helpful to you?
7 of 9 people found the following review helpful
Format:Paperback|Verified Purchase
I have really enjoyed this book from the begining to the end.

The new chapters from Steve and Dejan:

- Set Theory and Predicate Logic
- Algorithms and Complexity
- The Relational Model

are a very good complement. Having these topics is handy and refreshing, not to mention a must in this discipline.

Itzik's cover about the new T-SQL features introduced with SQL Server 2008, is insightful and very well guided. No doubt that he is an educator by nature.

If you are new to T-SQL, I strongly recommend that you first read Itzik's book "Microsoft® SQL Server® 2008 T-SQL Fundamentals", prior to diving into this series (T-SQL Querying and T-SQL Programming).

Thanks to all the authors for such wonderful book.

Alejandro Mesa
SQL Server MVP
Comment | 
Was this review helpful to you?
1 of 1 people found the following review helpful
Format:Paperback|Verified Purchase
Sometimes, the authors of technical books have the prerequisite expert knowledge and have an outstanding organization and game plan. But their writing is just too ambiguous. This is one of those books. The author should simply get to the point and not meander too much.

First, this book is not for the beginners. Indeed, you may not need all the knowledge contained in this book to be even intermediate DBA or DB Developer. But if you want to raise your knowledge of MS SQL to an expert level, a book like this sure helps. It is really too bad the author can't be more forthright in his writing.

1)Expert in how MS SQL processes transactions.
2)Outstanding organization.
3)Comprehensive explanation of T-SQL.
4)If you want to understanding SQL performance tuning, this book is a must.

1)Not for the beginners.
2)Writing could be far more lucid.
Comment | 
Was this review helpful to you?
5.0 out of 5 stars Superior multi-author textbook September 12, 2010
Format:Paperback|Verified Purchase
Most multi-author technical texts suffer from repetition, problems with consistent naming, or even areas of frank disagreement. This book is superbly edited, and one hears the different voices of the authors, but there is a careful coordination of content. I used the book, in combination with the lead author's "fundamentals" book, to gain a rapid introduction to the field. The discussion of set theory and predicate logic is superior, and the authors' do a superior job of gently leading you down the introductory road to the product. I liked the fact that they consistently draw a distinction between extensions of standards SQL and T-SQL.
Comment | 
Was this review helpful to you?
5.0 out of 5 stars A Great Book February 5, 2011
Format:Paperback|Verified Purchase
This book is not for beginners. I have worked with SQL Server since version 7 and still learned much from this and its sister volume, "T-SQL Programming." The first four chapters are heavily spread with math, theory and server operations. It is essential knowledge, but advanced and assuming. That said, this is a terrific book. Exactly what I needed for expert level querying and technique moving forward. Buy it! Read it! Use its information! It won't let you down.
Comment | 
Was this review helpful to you?
4 of 6 people found the following review helpful
5.0 out of 5 stars Very well done August 23, 2009
I'm new to T-SQL, but not new to database programming. I found this to be an excellent reference for the advanced programmer. The examples are well thought out and well organized. He often gives several different examples of how to solve a problem along with the pros and cons of each solution.
Comment | 
Was this review helpful to you?
4.0 out of 5 stars Strong SQL guide May 17, 2014
Format:Paperback|Verified Purchase
Really well layed out guide on the SQL querying capabilities of SQL Server 2008. Good reference guide for those who need quick and accurate answers
Comment | 
Was this review helpful to you?
5.0 out of 5 stars Best book on SQL EVER. April 6, 2014
Format:Paperback|Verified Purchase
Yes, I didn't make a typo. I didn't mean to write T-SQL and wrote SQL by accident.

This book is a jewel. It gives complex and useful SQL algorythms along with explanation both on logic side and on performance side. The performance part will depend on whether you use SQL 2008, 2012, or even Oracle databases but the logical will remain forever on your mind.

If you have any doubts on joins, correlated subqueries, running aggregations, this book is the best that you can try to solve them. Itzik knows what he talks and he knows how to teach it. Thinking in a join in steps is so much easier and that is how Itzik teaches us to do.

Well, I am an Oracle DBA, but there is no book like this in my side, so I congratulate Microsoft Press for this one.

Comment | 
Was this review helpful to you?
Most Recent Customer Reviews
5.0 out of 5 stars One of the best of the kind
One of the best IT books I've ever read. It explains everything you need to know about T-SQL and how your query is processed.
Published 4 months ago by Minh Thang Tran
5.0 out of 5 stars Great Go-To
I use this book in day-to-day work as a SQL Server DBA/Report Analyst, It's a great resource with quality examples, expanded explanations and exercises to walk through test cases... Read more
Published 11 months ago by Michael Arnett
5.0 out of 5 stars Highly recommended
This is like an expanded version of T-SQL Fundamentals by Itzik Ben-Gan, which is my SQL bible. Very well organized, great examples and I love that it covers what SQL does in the... Read more
Published 18 months ago by Amazilla
4.0 out of 5 stars Good book.
This is a good book as a reference book for beginner to intermediate knowledge of SQL. If you are looking for a way to learn SQL this is a good book to learn from too.
Published 20 months ago by Amazon Customer
2.0 out of 5 stars esperaba otra cosa
esperaba ver más T-SQL, enfocado ,más a rendimiento que a instruir en T-SQL, algunos ejemplos de rendimiento si pueden ser extraídos de él
Published 20 months ago by Juan Granados Reyes
4.0 out of 5 stars SQL Theory Empasized
In general, this book is well written and conveys the material in logical and progressive order. But readers should be ready for a great deal of theory. Read more
Published 22 months ago by R. R. Jacobsen
5.0 out of 5 stars Amazing coverage of advanced topics
I've been using SQL for many years but am new to T-SQL (mostly used mySQL before) and have not had the need to do complicated SQL queries before, or mySQL did not have the... Read more
Published on May 15, 2012 by JR
4.0 out of 5 stars Great Information; too much theory
This book is jam packed with information, but a lot of it is theory and heavy mathematics that completely confused me. Read more
Published on April 25, 2012 by Eric Zierdt
5.0 out of 5 stars This book is the Gold Standard
This book is an amazing wealth of information on advanced SQL querying techniques. I've got a ton of bookmarks in this book and I try to flip through it on occasion again in case... Read more
Published on April 19, 2012 by J. Carter
5.0 out of 5 stars I *heard* this was good, but...
I didn't know it would be *that* good! AWESOME!!! Gotta love a book that teaches you something even if you are just skimming around. Read more
Published on February 24, 2012 by P. Linden
Search Customer Reviews
Search these reviews only

More About the Authors

Discover books, learn about writers, read author blogs, and more.


Have something you'd like to share about this product?
Start a new discussion
First post:
Prompts for sign-in

Search Customer Discussions
Search all Amazon discussions

Look for Similar Items by Category