Conclusion

I covered many aspects of joins and set operations and demonstrated new techniques that you might find handy.

Remember that the old-style proprietary syntax for outer joins is not supported any more and will work only under a backward compatibility mode. At the same time, other types of joins that use the ANSI SQL:1989 syntax are fully supported, as this syntax is still part of the standard—although when using the older syntax for inner joins, there’s a risk of getting a Cartesian product when you forget to specify a WHERE clause.

SQL Server 2005 introduces native operators for EXCEPT and INTERSECT. It also provides other tools that allow simple solutions for achieving EXCEPT ALL and INTERSECT ALL.

Get Inside Microsoft® SQL Server™ 2005: T-SQL Querying 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.