GET DIAGNOSTICS statement
Use the GET DIAGNOSTICS statement to return diagnostic information about the most recently executed SQL statement.
Syntax
Usage
Use this statement with .
The GET DIAGNOSTICS statement retrieves specified status information that the database server records in a structure called the diagnostics area. Using GET DIAGNOSTICS does not change the contents of the diagnostics area.
The GET DIAGNOSTICS statement uses one of
the following two clauses:
- The Statement clause returns count and overflow information about errors and warnings that the most recent SQL statement generates.
- The EXCEPTION clause provides specific information about errors and warnings that the most recent SQL statement generates.