MYSQL VIEW Query

Mysql support view from version 5.x, View features gives the sign of
SQL standard 2003.
View is nothing but a virtual table on based on result set of an MYSQL statement. Its also have rows and column like a real table but the field s in view may be one or more than one tables in the same database. we can apply MYSQL function on view it seems like a single table.

View queries process in two ways:-

* MYSQL support creating a temporary table based on query which makes
the views and then execute the input query on this temporary table

*MYSQL firstly combine the view and input query then executes the
query.

MYSQL also support nested view. In the select statement of view we can
reference to another view.

In a cached enable system view is stored in the cache. As a result performing of query is fast becuase its fetch data from the buffering instead of physical hard disk.

View Display:
SHOW statement is use to display view defined. The syntax is

SHOW CREATE VIEW Databasename.viewname;

Creating View:
view shows latest updated data in the sql query result because database engine recreate data view sql statement.

CREATE VIEW viewname As Select columnnames from tablename ;

UPDATE VIEW:
CREAT OR REPLACE VIEW viewname AS Select columnames from tablename ;
DROPPING VIEW:
DROP VIEW viewname;

we can delete a already existing view with DROP VIEW MYSQL query.

Leave a Reply to This Post

Your email address will not be published. Required fields are marked *

*

You may also like

Latest From 360 KLP Blog

Posted In: Tour and Travel

No matter, where you go, but reaching your destination on time is important. If not you reach your destination on time, you will have to face the issues according to the purpose you go for that destination. For example, if you are going to ai...

Posted In: Clothing

It is true that, most of us do not find time to wash our clothes as we are so busy in office and home. As far the cafes, hotels, salons and other offices are concerned, they need to definitely hire the laundry service to wash the clothes, as ...