- 查询表信息
SELECT owner,
table_name,
tablespace_name,
num_rows,
con_id
FROM cdb_tables
WHERE table_name = Upper('&table_name');
- 查询container信息
SELECT *
FROM v$containers
WHERE con_id = '&con_id';
SELECT name
FROM v$containers vc,
cdb_tables ct
WHERE table_name = 'tb_name'
AND vc.con_id = ct.con_id;
- 进入container
alter session set container=&container_name;
- 查询数据
select * from owner.table_name as of timestamp to_timestamp('2019-06-06 17:50:00', 'yyyy-mm-dd hh24:mi:ss');
- 创建新表
create table owner.table_name_bak tablespace tbs_name as select * from owner.table_name as of timestamp to_timestamp('2019-06-06 17:50:00', 'yyyy-mm-dd hh24:mi:ss');
网友评论