SQL (Structured Query Language) Question:

Download Job Interview Questions and Answers PDF

What occurs if a procedure or function terminates with failure without being handled?

SQL Interview Question
SQL Interview Question

Answer:

1. Any DML statements issued by the construct are still pending and can be committed or rolled back.
2. Any DML statements issued by the construct are committed
3. Unless a GOTO statement is used to continue processing within the BEGIN section, the construct terminates.
4. The construct rolls back any DML statements issued and returns the unhandled exception to the calling environment.

Download SQL Interview Questions And Answers PDF

Previous QuestionNext Question
Procedure and Functions are explicitly executed. This is different from a database trigger. When is a database trigger executed?Examine this below sql code