Nwn
Nwn

Reputation: 571

Can we alter the dbspace of a informix table?

Suppose I have following schema.

create table tb1
(col1 Integer,
 col2 varchar(50)
) in dbspace1 extent size 1000 next 500 lock mode row;

and I want to change the dbspace of above table to dbspace2 . After doing my alteration table schema should be look like as follows .

create table tb1
(col1 Integer,
 col2 varchar(50)
) in dbspace2 extent size 1000 next 500 lock mode row;

Is it possible to do? If it is possible what is the command?

Upvotes: 1

Views: 1138

Answers (1)

Jonathan Leffler
Jonathan Leffler

Reputation: 754410

On the face of it, the ALTER FRAGMENT statement and the INIT clause allows you to write:

ALTER FRAGMENT ON TABLE tb1 INIT IN dbspace2;

The keyword TABLE is required; you could specify an index instead.

I've not actually experimented to prove that it works, but the syntax diagram certainly allows it.

Upvotes: 1

Related Questions