Update View syntax
UPDATE view_name SET col_name WHERE condition;
COURSE_ID |
NAME |
DESCRIPTION |
DURATION |
PRICE |
2 |
SQL 2 |
SQL course for advanced |
2 week |
50 |
4 |
PHP |
PHP course |
4 week |
75 |
5 |
CSS |
Learn CSS |
2 week |
20 |
100 |
Python |
Python course |
4 week |
80 |
Update View example
update course_view
set price=89
where course_id=100;
commit;
select * from course_view;
Output:
COURSE_ID |
NAME |
DESCRIPTION |
DURATION |
PRICE |
2 |
SQL 2 |
SQL course for advanced |
2 week |
50 |
4 |
PHP |
PHP course |
4 week |
75 |
5 |
CSS |
Learn CSS |
2 week |
20 |
100 |
Python |
Python course |
4 week |
89 |