GET DIAGNOSTICS statement

The GET DIAGNOSTICS statement obtains information about the previous SQL statement that was executed.

See GET DIAGNOSTICS statement.

When you need to specify a variable in a GET DIAGNOSTICS statement that is used within an SQL procedure, you would use either SQL-variable-name or SQL-parameter-name. In an embedded GET DIAGNOSTICS statement, you would use a host-variable. You can replace the instances of host-variable in the description of GET DIAGNOSTICS statement with SQL-variable-name or SQL-parameter-name.