View
Word:View
What is a view:
A view can be thought of as a " table of temporarily stored data "(not a real table), but essentially a select statement. Just make the select statement (usually more complex) a " wrapper "and set a name that can then be used as a table by that name.
If a SELECT statement is complex and needs to be used on multiple pages, it can be made into a view for ease of use.
Also, if some of the fields in a datasheet don't want to be seen (when data is exchanged between companies), but the other needs to be seen, the view can be used at this point.
View Creation form:
Create view name [(column name 1, column name 2,... )] as a complex select statement;
You can rename the columns obtained by the SELECT statement, but you can also do so without renaming, using the given column name in the SELECT statement.
Use of views
is actually used as a query table (usually only for select)
SELECT * from view name where condition order by ..... .
To Modify a view:
Alter VIEW name [(column name 1, column name 2,... )] as select statement;
To Delete a view:
Drop view [if exists] views name;
MySQL Basics (5)--View