MySQL 支持视图,包括可更新视图。视图是存储的查询,当调用时会生成结果集。视图充当虚拟表。MySQL supports views, including updatable views. Views are stored queries that when invoked produce a result set. A view acts as a virtual table.
下面的讨论描述了创建和删除视图的语法,并展示了一些如何使用它们的示例。The following discussion describes the syntax for creating and dropping views, and shows some examples of how to use them.
附加资源Additional Resources
在使用视图时,你可能会发现 MySQL 用户论坛 很有帮助。You may find the MySQL User Forums helpful when working with views.
关于 MySQL 中视图的一些常见问题的答案,请参见 A.6 节,“MySQL 8.4 FAQ: 视图”。For answers to some commonly asked questions regarding views in MySQL, see Section A.6, “MySQL 8.4 FAQ: Views”.
使用视图有一些限制;请参见 第 27.9 节,“视图的限制”。There are some restrictions on the use of views; see Section 27.9, “Restrictions on Views”.