RE: CREATE TABLE & INDEX in one transaction
Posted in 1999
Sez here in the manual CREATE TABLE and CREATE INDEX cannot be rolled back
anyway. I expect you could check the index creation and do a DROP TABLE if
it fails.
> -----Original Message-----
> From: Harry Sheng [SMTP:hsheng@crosskeys.com]
> Sent: Thursday, November 04, 1999 12:45 PM
> To: informix-list@iiug.org
> Subject: CREATE TABLE & INDEX in one transaction
>
> Hi,
>
> I want to create table and its index in one transaction.
> That is because if CREATE INDEX failed, I can rollback
> the CREATE TABLE.
>
> I used the following script in IDS7.30,
>
> begin work;
> create table tblname (....);
> create index xtblname on tblname (...);> commit work;
>
> I always got an #206 error. I do not know if I have to
> commit the "CREATE TABLE mytable" before
> I can create index on "mytable".
>
> Thanks a lot.