select 'SELECT DBMS_METADATA.GET_DDL (''INDEX'',''' || INDEX_NAME || ''')||'';'' FROM DUAL;' from dba_indexes where owner = 'SCOTT';