Skip to main content
World Nomads Logo

How to update view in MySQL ?

MySQL Update VIEW

In MYSQL, the ALTER VIEW statement is used to modify or update the already created VIEW without dropping it.

Syntax:
ALTER VIEW view_name AS 
SELECT columns 
FROM table 
WHERE conditions; 

Example:
The following example will alter the already created VIEW name "trainer" by adding a new column.
ALTER VIEW trainer AS 
SELECT course_name, course_trainer, course_id 
FROM courses; 

To see the altered VIEW:
SELECT*FROM trainer;

Subscribe channel on YouTube
Read this post on Blogger
Like page on Facebook
Tweet about video on twitter
Let's chat on whatsapp
See you at Instagram

Comments

Contact Us

Name

Email *

Message *