DBA > Job Interview Questions > Database developer interview questions

Consider the following transaction code

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

6. Consider the following transaction code

6. Consider the following transaction code:

Begin Transaction
Update names_table set employee_name = "Ramesh" where employee_name = "Mahesh"
Save Transaction SAVE_POINT
Update salaries set salary=salary + 900 where employee_job = "Engineer"
Rollback transaction
Commit transaction
What will be the result produced by this transaction?
1. “Ramesh” will be updated to “Mahesh”, but salaries of engineers will not be updated
2. Neither “Ramesh” will be updated to “Mahesh”, nor the salary of engineers will be updated.
3. “Ramesh” will be updated to “Mahesh” and salary of engineers will also be updated.

(Continued on next question...)

Other Job Interview Questions