Quote:
Originally posted by lloydnwo
Hi all,
I would like to know whether we can create a table & index in different dbspaces in one command. We can create it in oracle, below is the code
CREATE TABLE TEST
(
COL1 NUMBER(4) CONSTRAINT PK_TEST_COL1
PRIMARY KEY
USING INDEX TABLESPACE OFMIDX,
COL2 varchar2(4),
COL3 date )
TABLESPACE USERS
Can we do the same in informix, if yes, please give me the syntax.
Regards,
lloyd
|
Hi Lloyd,
This syntax is of Oracle, for Informix is
CREATE TABLE TEST
(
COL1 type .... CONSTRAINT PK_TEST_COL1
PRIMARY KEY,
COL2 type .... ,
) extent size xx next size xx in dbspace name;
The primari key index will build in dbspace from the table exist, now if you not want this then create of table without primary key, then run create unique index ..... in dbspace name.
Gustavo.