SELECT ‘alter index MYPROJ.’ || index_name || ‘ rebuild tablespace MYPROJINDX;’
FROM dba_indexes
WHERE owner = ‘MYPROJ’
AND tablespace_name != ‘MYPROJINDX’
ORDER BY index_name;
SELECT ‘alter index MYPROJ.’ || index_name || ‘ rebuild tablespace MYPROJINDX;’
FROM dba_indexes
WHERE owner = ‘MYPROJ’
AND tablespace_name != ‘MYPROJINDX’
ORDER BY index_name;