Chapter 3. Asking a Better Question: Advanced Queries
Before I get rambling along with the topics of this chapter, let me warn those of you that are already pretty familiar with the many features of SQL Server that this is an area of significant change! SQL Server now has support for keywords such as INTERSECT
and EXCEPT
. There is the ability to merge the results of one statement as part of the action for another statement using the new MERGE
command. We also need to take a look at recursive query support. In short, don't change that dial....
The topic of advanced queries requires some tough decisions for me each time I write a book. For example, what exactly is "advanced"? In the past I've debated such things as whether to do advanced queries before or after cursors. This time around I briefly considered that question again, but also found myself asking how much overlap I wanted to have with topics I also cover in my Beginning title. Then there are other questions, such as do I want to have an advanced discussion of indexing first? How about the XML discussion? You see, it's something of a chicken and egg thing (which came first?). You don't need to know anything about cursors to make use of the topics covered in this chapter, but, for example, we'll be discussing some benefits of different query methods that avoid cursors — and it really helps to understand the benefits if you know what you're trying to avoid. There are similar issues when I consider integrating relational vs. ...
Get Professional Microsoft® SQL Server® 2008 Programming 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.