Qtr No. 213, New Town Yehlanka Indore 454775
Consider the table employee with below data,
employee:
emp_id | emp_name | emp_salary | emp_designation
-----------+----------------+------------------+-----------------
1001 | John | 50000 | PM
1002 | Peter | 30000 | SE
1003 | Mike | 55000 | PM
1004 | Henry | 40000 | SE
Mark, a database admin has executed below transaction on employee table.
BEGIN;
delete from employee where emp_id=1001;
Update employee set emp_salary = emp_salary+1000 where emp_name = 'Peter';
ROLLBACK;
END;
What will be change to database system after executing above transaction?
NOTE: AUTOCOMMIT is ON
It will execute the delete and update queries, save the changes permanently to the database system and ROLLBACK command does not have any impact.
It will execute the delete and update queries, then save the changes temporarily in the buffer memory and ROLLBACK command will reverse the operations to bring it back to previous state.
Transaction will not execute as delete query is wrong
Transaction will not execute as update query is wrong
To get all Infosys Certified PostgreSQL Associate Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in