MySQL----view

Source: Internet
Author: User

View: is a virtual table, which is the essence of your own definition of a query SQL statement, through this view (statement), you each time to get the view data is equivalent to using a SQL statement even query, generate dynamic datasets (data do not need you to add, when you go to get data is, The view is automatically queried according to its own SQK statement)

Create a View

Create VIEW v1 AS

Select name, age from info where age>10

You can also modify a view to delete an operation

Delete using Drop View V1

The beginning of the modification is to reset the query statement, equivalent to delete the original, and then regenerate a view with the same name

Alter VIEW v1 AS

SELECT * FROM Info

For the view we can only query it, can not be modified or deleted (unable to manipulate the real data)

MySQL----view

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.