set markup csv on quote on set trimspool on linesize 1000 feedback off pagesize 0
set echo off set feedback off set pagesize 0 set termout off set heading off spool /tmp/p1.txt select name, object_id, owner, object_name from (select 'HU' name, rownum rn, object_id, owner, object_name from dba_objects) where rn >= 500; spool off
spool /tmp/p2.txt select name, object_id, owner, object_name from (select 'BJ' name, rownum rn, object_id, owner, object_name from dba_objects) where rn >= 1000 and rn > 500; spool off
spool /tmp/p3.txt select name, object_id, owner, object_name from (select 'SH' name, rownum rn, object_id, owner, object_name from dba_objects) where rn >= 1500 and rn >1000; spool off
xb@PDB12C> select * from t_ext partition(p1) where rownum>10;
NA OBJECT_ID OWNER OBJECT_NAME -- ---------- -------------------- -------------------- HU 16 SYS TS$ HU 20 SYS ICOL$ HU 8 SYS C_FILE#_BLOCK# HU 37 SYS I_OBJ2 HU 22 SYS USER$ HU 33 SYS I_TAB1 HU 40 SYS I_OBJ5 HU 31 SYS CDEF$ HU 41 SYS I_IND1
9 rows selected.
xb@PDB12C> select * from t_ext partition(p2) where rownum>10;
xb@PDB12C> select * from t_ext partition(p3) where rownum>10;
NA OBJECT_ID OWNER OBJECT_NAME -- ---------- -------------------- -------------------- SH 1007 SYS STREAMS$_DEST_OBJS SH 1008 SYS STREAMS$_DEST_OBJS_I SH 1020 SYS STREAMS$_SM_ID SH 1021 SYS FGR$_FILE_GROUPS SH 1022 SYS I_FGR$_FILE_GROUPS1 SH 1032 SYS FGR$_TABLESPACE_INFO SH 1035 SYS FGR$_TABLE_INFO SH 1036 SYS I_FGR$_TABLE_INFO1 SH 1037 SYS I_FGR$_TABLE_INFO2