08 09 (5) SQL Database Programming Landscape
08 09 (5) SQL Database Programming Landscape
08 09 (5) SQL Database Programming Landscape
Outline
1. Introduction 2. Data Definition, Basic Constraints, and Schema Changes 3. Basic Queries 4. More complex Queries 5. Aggregate Functions and Grouping 6. Advanced Querying Issues 7. Summary of SQL Queries 8. Data Change statements 9. Views 10. Complex Constraints 11. Database Programming
SQL provides two mechanisms for returning information describing such situations to the host program: a five character string variable SQLSTATE and a diagnostics area.
The DBMS sends information to be stored in that variable after each SQL statement is executed.
If the value of SQLSTATE is 00000, the last statement executed successfully. If not, the particular exception situation can be determined, and appropriate action can be taken.