且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从基表中删除行会影响该表的视图吗?

更新时间:2023-02-06 21:21:37

删除表中的一行将影响常规视图的结果。

Deleting a row in a table will affect the results from regular views.

创建视图时不执行。它们在引用时执行。每次您在查询中引用该视图时,它都会再次运行。因此,对基础表中数据的任何更新都会影响该视图。

Views are not executed when they are created. They are executed when they are referenced. Each time you reference the view in the query, it is run again. So, any updates to the data in the underlying tables will affect the view.

这不适用于实例化视图,在 时执行他们被创建。为了反映基础数据的变化,您需要刷新一个实例化视图。

This does not apply to materialized views, which are executed when they are created. To reflect changes in the underlying data, you need to refresh a materialized view.