View in MySQL

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;

Leave a Reply

You must be logged in to post a comment.


All material @ copyrighted by chrisranjana.com. If you want to link to this article you are welcome to do so. Unauthorized publication is strictly prohibited. This developer tutorial website contains articles by Php programmers , Software developers, Mysql programmers and asp c# programmers. This website also contains ajax tutorials and advanced mysql sql stored procedures and functions tutorials and sample codes.