Changing column names after creating a VIEW
If any column name changes after creating a VIEW, selecting the VIEW will get the following error:
 #1356 - View 'university.student_notes' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
In this case we need to drop and recreate the VIEW
DROP VIEW IF EXISTS student_notes;

CREATE VIEW student_notes AS
SELECT 
    students.first_name,
    students.last_name,
    students.points,
    notes.*
FROM students
JOIN notes ON notes.student_id = students.id
by Valeri Tandilashvili
4 years ago
MySQL
Views
1
Pro tip: use ```triple backticks around text``` to write in code fences