Rules and limitations views

□ Like tables, views must be uniquely named (not to view or take another view of the same name and table).

□ no limit to the number of views that can be created.

□ create a view, you must have sufficient access rights. These rights are usually granted by the database manager.

□ view can be nested, i.e., may be utilized to construct a query from the other views to retrieve data view. Allowed nesting level is different in different DBMS in (nested views may severely degrade the performance of the query, so before using in a production environment, you should test them thoroughly).

□ Many DBMS prohibit the use of the ORDER BY clause in the view query.

□ Some DBMS requirements for all columns returned by name, if the column is a calculated field, you need to use an alias.

□ view can not be indexed, you can not have triggers or default values ​​associated with it.

□ Some DBMS to view as a read-only queries, which means that you can retrieve data from the view, but you can not write data back to the underlying tables. Please refer to the specific DBMS documentation.

□ Some DBMS allow the creation of such a view, it can not be inserted into the line leading to no longer belong to view or update. For example there is a view, retrieve only customers with email addresses. If a customer update, delete his email address, the customer will no longer belong to the view. This is the default behavior, and is allowed, but some DBMS may prevent this from happening.

Published 45 original articles · won praise 6 · views 1968

Guess you like

Origin blog.csdn.net/qq_22583191/article/details/104365990