Today we will learn how to create view ( with pictures)
Now we learning in this example creating table, create view and
inserting values into view and linking to table that view
CREATE VIEW Syntax
CREATE [OR REPLACE]
[ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
[DEFINER = { user | CURRENT_USER }]
[SQL SECURITY { DEFINER | INVOKER }]
VIEW view_name [(column_list)]
AS select_statement [WITH
[CASCADED | LOCAL] CHECK OPTION]
Here with an example exaplained(pictures)
1. create table t in the database/schema satya
2. insert values into that table
3. create view with the name v to that table t
CREATE [OR REPLACE]
[ALGORITHM = {UNDEFINED | MERGE | TEMPTABLE}]
[DEFINER = { user | CURRENT_USER }]
[SQL SECURITY { DEFINER | INVOKER }]
VIEW view_name [(column_list)]
AS select_statement [WITH
[CASCADED | LOCAL] CHECK OPTION]
Here with an example exaplained(pictures)
1. create table t in the database/schema satya
2. insert values into that table
3. create view with the name v to that table t
now created table and inserting data values.
now inserted data to the table
created view to the required table as above