Altering a View
After creating a view, if we want to make any changes to it, we use the ALTER VIEW keywords.
The syntax is
ALTER VIEW name_of_view AS
SELECT statement;
For instance, we can use the following statement to alter myView:
ALTER VIEW myView AS
SELECT employees.id, mentorships.mentor_id, employees.em_name AS 'Mentor', mentorships.project AS 'Project'
FROM
mentorships
JOIN
employees
ON
employees.id = mentorships.mentor_id;
This changes the alias for the mentorships.project column from Project Name to Project (refer to underlined code).