1.查看某张表的过去N分钟的数据 select * from AAA(表名) as of timestamp (systimestamp - interval '' minute) where RT_PROJECT_ID='2021-1098';//查询过去二十分钟的数据 2. 恢复X表N分钟之前的数据 alter table X enable row movement; flashback table X to timestamp to_timestamp('2022-04-25 16:05:00', 'yyyy-mm-dd hh24:mi:ss'); //括号里的时间戳参数为=》恢复到指定时间的数据 3.删除某张表中的重复数据 delete from table_name t1 where (t1.col1, t1.col2) in (select col1, col2 from table_name group by col1, col2 having count(*) > 1) and t1.rowid in (select min(rowid) from table_name group by col1, col2 having count(*) > 1); 4.查询表结构SQL --查询数据库中是否有该表以及该表的数据-- SELECT UT.TABLE_NAME, --表名 UT.COLUMN_NAME,--字段名称 UC.COMMENTS, --字段注释 UT.DATA_TYPE, --字典类型 UT.DATA_LENGTH,--字典长度 UT.NULLABLE --是否为空 FROM USER_TAB_COLUMNS UT,USER_COL_COMMENTS UC WHERE UT.TABLE_NAME = UC.TABLE_NAME AND UT.COLUMN_NAME = UC.COLUMN_NAME --AND UC.COLUMN_NAME = 'LST_DATE' --AND UC.COMMENTS LIKE '%状态%' AND UT.TABLE_NAME = 'ORDER_INF' --表名必须是大写 ORDER BY UT.COLUMN_NAME;