Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: changing the tablespace for a table
Todd Marshall (toddm_at_semaphore.com) wrote:
: I need to move a table from one tablespace to another (same user). I
: can't for the life of me find any docs for doing this without
: changing users, which I don't want to do if I don't have to . Any ideas?
The simplest solution is to just create a copy of the old table in the new tablespace using a different table name; copy the data from the old table into the new table, i.e. insert into newtable select * from oldtable; drop the old table; and rename the new table to the same name as the old table. You don't have to change users; any user can create a database object in any tablespace in which he has been granted a space quota, you just have to specify the target tablespace in the CREATE statement.
-- ======================================================================== "Villains, I say to you now: | Mike Carmack KNOCK OFF ALL THAT EVIL!" | Vulcan Dragon -==(UDIC)==- S P O O N !!!! - The Tick | mcarmack_at_freenet.columbus.oh.usReceived on Fri May 30 1997 - 00:00:00 CDT
![]() |
![]() |