SQL return codes

The GET DIAGNOSTICS statement can be used in all languages to return return codes and other information about the previous SQL statement. For more information, see GET DIAGNOSTICS.

Additionally, each host language provides a mechanism for handling SQL return codes: