该表根据值可以为'1'或'2'的列(INSTANCE)进行了细分。想要列出所有包含INSTANCE值为“ 2”的子分区名称
select * from user_tab_subpartitions sp where table_name='TEST' and sp.NUM_ROWS >0
and to_char(HIGH_VALUE)='2';
错误
ORA-00932: inconsistent datatypes: expected CHAR got LONG
HIGH_VALUE的类型为LONG()
答案 0 :(得分:0)
您可以通过具有该值的记录的rowid获得包含特定值的所有子分区。
尝试此查询:
select distinct subobject_name
from user_objects obj join TEST tbl on obj.object_name = 'TEST'
and dbms_rowid.rowid_object(tbl.rowid) = obj.data_object_id
where tbl.INSTANCE = 2;
答案 1 :(得分:0)
ttl