Re: Syntax to create cluster index when create table?
Posted in 1998
In article <367203B2.978F13B3@erols.com>, Ruiming Chen <rctwo@erols.com>
writes
>In Sybase I do
>
>create table factory
>(
> factory_code char(6),
> factory_name varchar(30,1),
> constraint factory_pri primary key clustered (factory_code)
>);>
>This by default will have unique not null cluster index for factory_code
>as
>primary key.
>
>I want to do the same in Informix 7.x by
>
>create table factory
>(
> factory_code char(6) not null,
> factory_name varchar(30,1),
> primary key (factory_code) constraint factory_pri
>);
>create cluster index on factory (factory_code);>
>But this won't work. Because by default the above Informix SQL,
>the primary key created a null non cluster index and assigned a
>constraint name like 129_99.
>I found out this by get in the dbaccess. In my case I have to do
>
Do
create table factory
(
factory_code char(6) not null,
factory_name varchar(30,1),
);
create cluster index myindex on factor (factory_code)
then add the constraint...
>alter index 129_99 to cluster;>
>But that is not what I want! I want to create a not null cluster index
>for the
>primary key when creating table like Sybase does.
>What is the syntax? Thank you!
>
>--Raymond
>--
>RC Square Team.
>
>
>[ A MIME text / x-vcard part was included here. ]
>
--
David Williams