Re: Change a table's tablespace sandip wrote:
> Hi,
>
> i need to change the tablespace of a table, ie. use another tablespace
> for the table and stop the use of the existing tablespace. Is there any
> way i can accomplish this? One solution might be export the data from
> the table, re-create the tables in the new tablespace, drop the
> original tablespace and load the data. But i would prefer another
> simple and less time-consuming way.
You could create a new table in the other tablespace
CREATE TABLE <new-table> LIKE <old-table> IN <new-ts>
copy the data
INSERT INTO <new-nable> SELECT * FROM <old-table>
correct foreign keys to point to the new table and then remove the old
table.
--
Knut Stolze
Information Integration Development
IBM Germany / University of Jena |