Insert View syntax
INSERT INTO view_name(col_name) VALUES (col_value);
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 |
Insert View example
insert into course_view (course_id, name, description, duration, price)
values (100, 'Python', 'Python course', '4 weeks', 80);
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 |
80 |