Monday, September 28, 2009

Move Table

SQL> SPOOL C:/MOVE_TABLE.SQL

SELECT 'ALTER TABLE '|| OWNER ||'.'|| TABLE_NAME || CHR(10) ||
'MOVE TABLESPACE '||TABLESPACE_NAME ||';'
FROM DBA_TABLES
WHERE OWNER in ('HR','SCOTT')
AND TEMPORARY ='N'
order by owner,TABLE_NAME


SQL> SPOOL OFF

No comments: