Microsoft SQL Server 2008 T-SQL Fundamentals (PRO-Developer)
|
| List Price: | $49.99 |
| Price: | $31.49 & eligible for FREE Super Saver Shipping on orders over $25. Details |
Availability: Usually ships in 24 hours
Ships from and sold by Amazon.com
43 new or used available from $23.67
Average customer review:Product Description
Master the foundations of T-SQL with the right balance of conceptual and practical content. Get hands-on guidance—including exercises and code samples—that show you how to develop code to query and modify data. You’ll gain a solid understanding of the T-SQL language and good programming practices, and learn to write more efficient and powerful queries.
Discover how to:
- Apply T-SQL fundamentals, create tables, and define data integrity
- Understand logical query processing
- Query multiple tables using joins and subqueries
- Simplify code and improve maintainability with table expressions
- Explore pivoting techniques and how to handle grouping sets
- Write code that modifies data
- Isolate inconsistent data and address deadlock and blocking scenarios
Product Details
- Amazon Sales Rank: #21133 in Books
- Published on: 2008-10-22
- Original language: English
- Number of items: 1
- Binding: Paperback
- 416 pages
Features
- ISBN13: 9780735626010
- Condition: NEW
- Notes: Brand New from Publisher. No Remainder Mark.
- Click here to view our Condition Guide and Shipping Prices
Customer Reviews
There just is no point in writing another book on T-SQL after this
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
Not just syntax, but the theory behind it
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.
Excellent book - clear focus and ordered presentation
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.



