SQL> SQL> select 'alter index '||owner||'.'||index_name||' rebuild tablespace MDMIS_01;' 2 from dba_indexes 3 where tablespace_name != 'MDMIS_01' 4 and owner ='MDMADM' 5 and index_type = 'NORMAL' 6 / SQL> SQL> spool off