物化视图:如何确定原始表是否已更改? [英] Materialized View: How to determine whether original tables were changed?

查看:187
本文介绍了物化视图:如何确定原始表是否已更改?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在许多表格上创建了​​一个MV.我不想自动刷新它.我只想知道原始表是否已更改.最佳方法是什么?

I''ve created a MV, on many tables. I don''t want to auto-refresh it. I just want to know whether original tables were changed or not. What is the best way to do that?

推荐答案

尝试:
SELECT * FROM all_tab_modifications


调整查询以适合您的需求.

< edit>
我只是意识到这可能不是您要查询的表的最新修改,而是表 content 的最新修改.
在这种情况下,您可以改为运行以下查询:


Adjust the query to fit your needs.

<edit>
I just realized that it might not be the latest modification of the table you''re asking for, but the latest modification of the tables content.
In that case you can run this query instead:

SELECT  scn_to_timestamp(max(ora_rowscn)) 
FROM    Mytable

</edit>

</edit>


这篇关于物化视图:如何确定原始表是否已更改?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆