Book description
Get a detailed look at the internal architecture of T-SQL with this comprehensive programming reference. Database developers and administrators get best practices, expert techniques, and code samples to master the intricacies of this programming language—solving complex problems with real-world solutions.
Discover how to:
Work with T-SQL and CLR user-defined functions, stored procedures, and triggers.
Handle transactions, concurrency, and error handling.
Efficiently use temporary objects, including temporary tables, table variables, and table expressions.
Evaluate when to use set-based programming techniques and when to use cursors.
Work with dynamic SQL in an efficient and secure manner.
Treat date- and time-related data in a robust manner.
Develop CLR user-defined types and learn about temporal support in the relational model.
Use XML and XQuery and implement a dynamic schema solution.
Work with spatial data using the new geometry and geography types and spatial indexes.
Track access and changes to data using extended events, SQL Server Audit, change tracking, and change data capture.
Use Service Broker for controlled asynchronous processing in database applications.
All the book’s code samples will be available for download from the companion Web site.
Table of contents
- Dedication
- Foreword
- Acknowledgments
- Introduction
- 1. Views
- 2. User-Defined Functions
- 3. Stored Procedures
-
4. Triggers
-
AFTER Triggers
- The inserted and deleted Special Tables
- Identifying the Number of Affected Rows
- Identifying the Type of Trigger
- Not Firing Triggers for Specific Statements
- Nesting and Recursion
- UPDATE and COLUMNS_UPDATED
- Auditing Example
- INSTEAD OF Triggers
- Per-Row Triggers
- Used with Views
- Automatic Handling of Sequences
- DDL Triggers
- Logon Triggers
- CLR Triggers
- Conclusion
-
AFTER Triggers
- 5. Transactions and Concurrency
- 6. Error Handling
- 7. Temporary Tables and Table Variables
- 8. Cursors
- 9. Dynamic SQL
- 10. Working with Date and Time
- 11. CLR User-Defined Types
- 12. Temporal Support in the Relational Model
-
13. XML and XQuery
- Converting Relational Data to XML and Vice Versa
- The XQuery Language in SQL Server 2008
- XML Data Type
- Dynamic Relational Schema
- Conclusion
-
14. Spatial Data
- Introduction to Spatial Data
- Basic Spatial Data Concepts
- Data
- Getting Started with Spatial Data
- Spatial Data Validity
- Measuring Length and Area
- Indexing Spatial Data
- Using Spatial Data to Solve Problems
- Extending Spatial Support with CLR Routines
- Conclusion
- 15. Tracking Access and Changes to Data
- 16. Service Broker
- A. Companion to CLR Routines
- B. About the Authors
- Index
- About the Authors
- Copyright
Product information
- Title: Inside Microsoft® SQL Server® 2008: T-SQL Programming
- Author(s):
- Release date: September 2009
- Publisher(s): Microsoft Press
- ISBN: 9780735639928
You might also like
book
Inside Microsoft® SQL Server® 2008: T-SQL Querying
Tackle the toughest set-based querying and query tuning problems—guided by an author team with in-depth, inside …
book
Programming Microsoft® SQL Server® 2012
Your essential guide to key programming features in Microsoft SQL Server 2012 Take your database programming …
book
SQL Server 2005 Practical Troubleshooting: The Database Engine
Never-Before-Published Insiders’ Information for Troubleshooting SQL Server 2005. This is the definitive guide to troubleshooting the …
book
Microsoft® SQL Server® 2008 Bible
Harness the power of SQL Server, Microsoft’s high-performance database and data analysis software package, by accesing …