33 of 33 people found the following review helpful:
5.0 out of 5 stars
Not just syntax, but the theory behind it, December 15, 2008
This review is from: Microsoft® SQL Server® 2008 T-SQL Fundamentals (PRO-Developer) (Paperback)
I'm half way through this book and I am totally impressed. The author not only explains T-SQL syntax very systematically, but also explains enough of the theory behind it to help you understand why. This makes it much easier to optimize your syntax and avoid logical bugs in your code. This is not an introductory level SQL book, but it's not a book for experts either. I have been writing SQL for years and I have learned a great deal from this book already. I highly recommend this book if you are looking to take your SQL skills from basic/intermediate to a more advanced level.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
28 of 28 people found the following review helpful:
5.0 out of 5 stars
Excellent book - clear focus and ordered presentation, December 4, 2008
This review is from: Microsoft® SQL Server® 2008 T-SQL Fundamentals (PRO-Developer) (Paperback)
I have worked with T-SQL for about 11 years, but nevertheless immediately pre-ordered this "Fundamentals" book when I saw a blog post about it - for three reasons: (a) I wanted to fill in any missing gaps in my understanding of the language, (b) I wanted to learn what was new with the 2008 offering, and (c) I have heard Itzik Ben-gan speak and read his blog for sometime and always find his presentations to be excellent. I was not disappointed.
For me, this has been one of those rare reads, where I can see where the topic is going but it is never dull because I either learn something new about the subject or the presentation clarifies what I already knew. I especially like how the book continually reinforces how T-SQL is built on set theory and predicate logic.
Great read and reference. I highly recommend it.
Kudos to the author.
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No
42 of 45 people found the following review helpful:
5.0 out of 5 stars
There just is no point in writing another book on T-SQL after this, February 9, 2009
This review is from: Microsoft® SQL Server® 2008 T-SQL Fundamentals (PRO-Developer) (Paperback)
Film director Stanley Kubrick would make a film in a specific genre, after which there was almost no point in making movies in that genre any more. War movie - Paths of Glory, political satire - Dr Strangelove , historical film - Spartacus, science fiction - 2001 A Space Odyssey, horror - The Shining. Itzik Ben-Gan managed to do with his book what Kubrick did with his films. There just is no point in writing another book on T-SQL after his.
The first thing I looked for when I picked the book at the post office was the section on Outer Joins. A common question when using outer joins that is the source of lot of confusion is whether to specify a predicate in the ON or WHERE clause of the query. Itzik explains it definitively: " You can see that with respect to rows from the preserved side of an outer join, the filter based on the ON predicate is not final. In other words, the ON predicate does not detremine whether the row will show up in the output, only whether it will be matched with rows from the other side. So when you need to express a predicate that is not final - meaning a predicate that determines which rows to match from the nonpreserved side - specify the predicate in the ON clause. When you need a filter to be applied after outer rows are produced, and you want the filter to be final, specify the predicate in the WHERE clause. "
If only I this book existed ten years ago I would have avoided some of the mistakes I made through the years, only because some fundamental things were never clearly explained. Itzik fills the gaps for an exprienced DBA and gives a perfect basis for a novice. The fundamentals become crystal clear so that building on top of it is easy. Perhaps this can be best illustrated by the following example:
"Can you figure out how to write an UPDATE statement that swaps the values in col1 and col2? In most programming languages where expressions and assigments are evaluated in some order (typically left to write) , you need a temporary variable. However, because in SQL all assignments take place as if at the same point in time, the solution is very simple:
UPDATE dbo.T1
set col1= col2, col2 = col1;
In both assigments the source column values used are those prior to the update, so you don't need a temporary variable."
Now why did no other book I read ever give this simple example?
Common Table Expressions are explained really well, especially updating and deleting data using CTEs. Actually, the book covers all the 2005 and 2008 related enhacements ROW_NUMBER, RANK, DENSE_RANK and NTILE, Recursive Queries, APPLY,CROSS APPLY, OUTER APPLY,EXCEPT and INTERSECT, TRY...CATCH, TOP Enhancements, PIVOT UNPIVOT, DDL Triggers, MERGE. But it covers it in such a way that nothing seems complicated. We should give it to all out C++ programmers as well.
It was a pleasure reading the book
Help other customers find the most helpful reviews
Was this review helpful to you? Yes
No