The GET DIAGNOSTICS statement obtains information about the previous SQL statement that was executed.
For more information, see GET DIAGNOSTICS in the SQL Reference topic in the Information Center.