DML & Transactions · Question 3 · Easy
DML & Transactions question 3
Table Account:
acc_no | holder | balance
101 | Farah | 5000
102 | Gopal | 12000
103 | Hema | 800
104 | Imran | 7000
What balance does the SELECT show after the UPDATE?
UPDATE Account SET balance = balance + 500
WHERE acc_no = 103;
SELECT balance FROM Account WHERE acc_no = 103;
- 500
- 1300
- 800
- 1800
Answer and explanation
Answer: B. 1300
Explanation: The right-hand side uses the current value of the column: 800 + 500 = 1300. Only the row with acc_no 103 is changed, and it is changed once.
Previous: Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |… · Next: Which statement ends a transaction and makes all of its changes permanent?
Practise dml & transactions
Try a fresh set of dml & transactions questions with an explanation after every answer, free and without signing up: DML & Transactions practice. Or sit a full placement mock test.
More dml & transactions questions
- Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |…
- Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |…
- Which statement ends a transaction and makes all of its changes permanent?
- During a UPI transfer, ₹500 is debited from Meena's account, but the credit to…
- Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |…
- Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |…
- Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |…
- Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |…
- Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |…
- Table Account: acc_no | holder | balance 101 | Farah | 5000 102 | Gopal |…
More sql practice
SELECT, WHERE & ORDER BY · SQL Joins · Aggregates & GROUP BY · Subqueries & CTEs · Window Functions · NULL Handling · SQL Functions & CASE · UNION, INTERSECT & EXCEPT
LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge