Alter table to a new tablespace
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: Alter table to a new tablespace

  1. #1
    Join Date
    Feb 2001
    Posts
    6

    Post

    Hi there,

    Does anybody know of an easy way to change the tablespace in which a table is stored?

    Is there an ALTER TABLE option for this??

    Answers on a postcard please?

    Thx

    Ben

  2. #2
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    Couple of options depending upon the version.

    8i : ALTER TABLE MOVE
    lower versions:
    duplicate table with SELECT AS
    CREATE TABLE sample_emp AS SELECT empno, deptno FROM emp ;
    RENAME to TEMPORAY table in xyz tablespace and drop original table and rename it back to original table which is in xyz tablespace.
    Reddy,Sam

  3. #3
    Join Date
    Feb 2001
    Location
    Atlanta, USA
    Posts
    131

    dfgfdg

    sdfgdfg

  4. #4
    Join Date
    Feb 2001
    Posts
    15
    Hi,
    There is one possible method to move the table from one tablespace to another tablespace

    In Oracle 8i , ALTER TABLE EMP MOVE TABLESPACE <new tablespace>;


  5. #5
    Join Date
    Jul 2000
    Posts
    296
    If you use CREATE AS SELECT and RENAME you lose the constraints etc. You have to recreate them.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width