Advanced Transact-SQL for SQL Server 2000

By: Itzik Ben-Gan, Tom Moreau
Publication Date: October 2000
ISBN-13: 978-1893115828
ISBN-10: 1893115828
814 pages

Order the book at:

Table of Contents
Chapter 1: Joins in T-SQL
Chapter 2: Subqueries and Derived Tables
Chapter 3: Populating Tables
Chapter 4: Other Data Manipulation Issues
Chapter 5: Summarizing Data
Chapter 6: Special Datatypes and Properties
Chapter 7: Writing Code in T-SQL
Chapter 8: Views
Chapter 9: Stored Procedures
Chapter 10: Triggers — The Hidden Stored Procedures
Chapter 11: User-Defined Functions
Chapter 12: Temporary Tables
Chapter 13: Horizontally Partitioned Views
Chapter 14: Implementing Referential Integrity and Cascading Actions
Chapter 15: Server-Side Cursors — the SQL of Last Resort
Chapter 16: Expanding Hierarchies
Chapter 17: Tips and Tricks
Chapter 18: SQL Puzzle Solutions
Appendix A: DML Basics
Appendix B: Checking for ANSI Compatibility with SET FIPS_FLAGGER
Appendix C: Analyzing Query Performance
Appendix D: Ownership Chains
Appendix E: Pubs and Northwind Database Schemas
Appendix F: Dynamically Creating Triggers for Cascade Actions
Appendix G: References
This book is aimed at Information Technology professionals who are working with Microsoft SQL Server or who intend to use it as a development platform. Many books are written on the broad aspects of SQL Server or just on its administration. This book focuses on programming, with particular emphasis on the features of SQL Server 2000. However, references are made to releases 6.5 and 7.0 because we know there are still many installations of these releases in production today. These references will show you what’s in and what’s out, to get you up to speed on the new technology and enable you to upgrade your skills smoothly.

This book does not limit itself to single trivial examples. Rather, multiple cases are given of each feature in order to enforce your understanding. Not only are you provided with numerous examples, you are also shown real-world scenarios with real-world solutions, making this book a “must have” in your toolbox. Much of the code you will see is based upon cries for help posted in the Usenet newsgroup or from the readers of SQL Server Professional or SQL Server Magazine.

If you are a newbie or an old pro, this book is designed to develop you into a skilled, disciplined Transact-SQL programmer. If you are new to SQL Server, don’t be intimidated by the title. SQL is easy to learn. Doing it well is why this book is essential reading. The basics are covered in Appendix A for you to review and to help you if you are new to SQL.

Sample Content

Chapter 17: Tips & Tricks – Download

Download Source Code

Copyright notice: you’re only authorized to download the source code if you own a legal copy of the book.

Source Code for Advanced T-SQL 2000