The ConsultationFee field in a database table named Appointment stores the cost of a patient's medical consultation in pounds (£).
A clinic administrator wants to write a query to increase the ConsultationFee by 12 for all appointments that have a DurationMinutes of greater than 45.
The drafted query is shown in Figure 1.
UPDATE Appointment
SET ConsultationFee = ConsultationFee + 8
WHERE DurationMinutes <= 45
The query contains two errors. Refine the query in Figure 1 to correct the errors.
25 exam-style questions on AQA GCSE Computer Science Structured query language (SQL). Each one has a worked solution and a mark scheme showing where the marks go.