---index theo nam
DECLARE
v_nam varchar2(4) := '2012';
v_tablespace varchar2(50):='INDX';
cursor c1 is
-- select table_owner,table_name,max(partition_name)
-- from dba_tab_partitions group by table_owner,table_name having max(partition_name) like '%'||v_nam||'%' and length(max(partition_name))<9;
select table_owner,table_name,max(partition_name)
from dba_tab_partitions where table_name='table1' group by table_owner,table_name;
Sửa bài viết