Does the view in MySQL work, can the view be changed?

Source: Internet
Author: User
Tags mysql manual mysql view
This article focuses on the role of the view in MySQL and the question of whether you can change it.

A view is a virtual table that is not the same as the table that contains the data, and the view contains only queries that retrieve data dynamically when used, and does not contain any columns or data. Using views simplifies complex SQL operations, hides specific details, and protects the data, and when views are created, they can be used in the same way as tables.
The view cannot be indexed or has an associated trigger or default value, and if an order by is within the view itself, order by will be overwritten.

Creating view: Create View XXX as xxxxxxxxxxxxxx;

For some views, such as the group aggregation function distinct union, which is not using the join subquery, it is possible to update the base table by updating it, but the view is mainly used for simplifying the retrieval, protecting the data, not for updating, and most of the views are not updated.

For more MySQL View related content, you can refer to Topic.alibabacloud.com's MySQL video tutorial or mysql manual!

Related Article

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.