Oracle 判断表是否已完全刷新当天数据

前端之家收集整理的这篇文章主要介绍了Oracle 判断表是否已完全刷新当天数据前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

需求:当天备份表刷新完数据后,拉取当天数据。

问题:备份表需要刷新完,才拉取数据

解决

SELECT t.inv_date
  FROM rmsbak.cmx_item_loc_soh_bak t
 WHERE 1 = 1
   AND t.inv_date = trunc(SYSDATE)
   AND rownum = 1
   AND NOT EXISTS
 (SELECT object_name
          FROM gv$locked_object l,dba_objects o
         WHERE l.object_id  = o.object_id
           AND o.object_name = upper('RMSBAK')
           AND o.object_name = upper('CMX_ITEM_LOC_SOH_BAK'));
原文链接:https://www.f2er.com/oracle/207226.html

猜你在找的Oracle相关文章