student_notes
, increases author's points by one in students
table based on note's ID.
First we need to create the VIEWCREATE VIEW IF NOT EXISTS student_notes AS
SELECT
students.first_name,
students.last_name,
students.points,
notes.*
FROM students
JOIN notes ON notes.student_id = students.id
Then we update the VIEW as a regular tableUPDATE `student_notes`
SET points = points + 1
WHERE id = 1;