首页 > 数据库技术 > 详细

oracle视图

时间:2015-12-15 22:36:58      阅读:250      评论:0      收藏:0      [点我收藏+]

 

视图

SELECT
-- int.rowner "rgroup owner",
-- int.rname "refresh group",
mv.owner as "mview owner",
mv.mview_name as "mview name",
mv.master_link as "master link",
round(1440 * (sysdate - mv.last_refresh_date)) as "minutes behind",
to_char(int.next_date, yyyy-mm-dd hh24:mi:ss) "next date",
round(int.interval * 1440) "interval"
FROM dba_mviews mv,
(SELECT child.owner,
child.name,
child.rowner,
child.rname,
job.next_date,
job.next_date - job.last_date as interval
FROM dba_refresh ref, dba_refresh_children child, dba_jobs job
WHERE ref.rname = child.rname
AND ((upper(job.what) LIKE % || ref.rname || %) OR
(upper(job.what) LIKE % || ref.rname || %))) int
WHERE mv.owner = int.owner(+)
AND mv.mview_name = int.name(+)
ORDER BY (sysdate - mv.last_refresh_date) * 1440 DESC,
mv.owner,
mv.mview_name;

 

oracle视图

原文:http://www.cnblogs.com/wanghongye/p/4977087.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!