View
A view is a virtual table. A view looks like a table and works like a table. Apparently it will seem so to the user. In fact, a view is a table built with predefined queries. Some rows or all rows can be shown conditionally between views. Views can be created with one or more tables. When creating a view, the SELECT statement is actually executed, with which the view is created. The SELECT statement used to create the view can use only column names or more complex functions or calculated fields. A view is a predefined query stored in the database, which looks like a table and is used like a table, but which does not occupy any space in the database. A view is created in a database using the create view statement. A new view can be created from data from a single table, multiple tables or any other view. That user must have the necessary privileges to create the view. The syntax of the create view statement is as follows:
CREATE
[OR REPLACE]
[ALGORITHM = (UNDEFINED | MERGE | TEMPTABLE}]
[DEFINER= { user | CURRENT_USER }]
[SOL SECURITY | DEFINER | INVOKER }}
VIEW view_name [(column_list)]
AS select statement
[WITH [CASCADED | LOCAL] CHECK OPTION]
Comments
Post a Comment