Skip to main content
  • 930 Accesses

Abstract

Prior to SQL Server 2005, error handling was limited almost exclusively to the @@error system function and the RAISERROR statement, or through client-side exception handling. T-SQL in SQL Server 2012 still provides access to these tools, but it also supports modern structured error handling similar to that offered by other high-level languages such as C++, C#, and Visual Basic. In this chapter, we will discuss legacy T-SQL error-handling functionality and the newer structured error-handling model in T-SQL. This chapter introduces tools useful for debugging server-side code, including T-SQL statements and the Visual Studio IDE.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2012 Jay Natarajan, Rudi Bruchez, Scott Shaw, and Michael Coles

About this chapter

Cite this chapter

Natarajan, J., Bruchez, R., Shaw, S., Coles, M. (2012). Error Handling and Dynamic SQL. In: Pro T-SQL 2012 Programmer’s Guide. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-4597-1_17

Download citation

Publish with us

Policies and ethics