在oracle中如何在特定时间更新物化视图?



例如,我想在每天23:30更新以下物化视图。在START WITH和NEXT子句后面应该写什么?

CREATE MATERIALIZED VIEW test_example REFRESH COMPLETE  
START WITH 
NEXT
AS

现在就开始,每天23:30开始

create materialized view test_example
refresh complete
start with sysdate 
next trunc(sysdate) + 23/24 + 30/(24*60)
as select ...

@Littlefoot的简化回答:

如果你想让它在今天23:30开始,你可以这样写
create materialized view test_example
refresh complete
start with trunc(sysdate) + 23.5/24
next trunc(sysdate) + 23.5/24 + 1
as select ...

最新更新