Chapter 4

Error Handling

IN THIS CHAPTER

Bullet Identifying error conditions

Bullet Discovering SQLSTATE

Bullet Dealing with whatever comes your way

Bullet Using the WHENEVER clause

Bullet Checking the diagnostics areas

Bullet Seeing an example of a constraint violation

Bullet Putting more constraints on an existing table

Bullet Interpreting SQLSTATE information

Bullet Handling exceptions

Wouldn’t it be great if every application you wrote worked perfectly every time? Yeah, and it would also be really cool to win $210 million in the Powerball lottery. Unfortunately, both possibilities are equally unlikely to happen. Error conditions of one sort ...

Get SQL All-In-One For Dummies, 3rd Edition 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.