View in MySQL
View in MySQL
A view is like a table. The contents of this table are defined dynamically from a SELECT statement. Views can be processed using MySQL’s temporary table algorithm, or act as a kind of macro so that when you access a view, your query is actually transformed inside the server to incorporate the view definition.
Syntax:
CREATE VIEW view_name AS [SELECT query]
Example:
CREATE VIEW url AS SELECT distinct(url) from url_table;
