Discuss in Forum
In MySQL, a ‘View’ can refer to multiple tables. This makes it a lot simpler to execute the queries involving joins. When a selection is made from the view, the join is executed producing the results.
CREATE VIEW xyz (abc) AS SELECT a FROM t;
Column names for a view can be explicitly provided in the ‘CREATE VIEW’ clause itself. It presents the table view with the aliased column names instead of the original column names.
CREATE VIEW xyz AS SELECT a, b FROM t;
A ‘View’ is created in MySQL by writing the clause ‘CREATE VIEW’ followed by the view name. Then follows the list of column names of the table that are to be presented as the view.
In MySQL, a ‘View’ is used to present a table in the database. It is a virtual table. It is also used to present a subset of the columns that are present in the original table of the database.
In MySQL, a ‘View’ is also called a virtual table. It does not contain any data but only appears as a table. It is an alternative way to show or describe a table similar to the original table.