gpt4 book ai didi

oracle - Oracle 中的时态表

转载 作者:行者123 更新时间:2023-12-04 02:08:48 25 4
gpt4 key购买 nike

Tom Kyte 描述时态表 here :

temporal tables are tables that can return the answer that existed at a point in time -- you can ask the table to return the answer that existed at midnight last night, instead of the answer that exists right now

Oracle 中是否存在这样的表?我找不到它们的文档。如何创建并使用它?他说它们存在于数据库中,尽管他没有说它们存在于 Oracle 或任何其他产品中。这是概念上的东西没有实现吗?

最佳答案

好吧,我相信你的意思是获取比现在早一段时间的数据状态。在这种情况下,Oracle 建议闪回查询:

SQL> select * from t where x in (1,2,3);

X Y
---------- ----------
1 1
2 2
3 3

SQL> delete from t where x in (1,2,3);

SQL> commit;

SQL> select * from t where x in (1,2,3);

No rows selected

SQL> select * from t as of timestamp(systimestamp - interval '2' minute) where x in (1,2,3)
2 /

X Y
---------- ----------
1 1
2 2
3 3

Oracle 在那里描述了这个选项

http://docs.oracle.com/cd/B12037_01/appdev.101/b10795/adfns_fl.htm#1008580

从临时表开始 - 请参阅此引用资料:

http://docs.oracle.com/cd/B28359_01/server.111/b28310/tables003.htm#ADMIN01503

关于oracle - Oracle 中的时态表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21139448/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com