Syntax to create cluster index when create table?
Posted in 1998
This is a multi-part message in MIME format.
--------------AA5EF7FFD78B278F5BB9BAB8
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
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
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.
--------------AA5EF7FFD78B278F5BB9BAB8
Content-Type: text/x-vcard; charset=us-ascii;
name="rctwo.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Ruiming Chen
Content-Disposition: attachment;
filename="rctwo.vcf"
begin:vcard
n:Chui /Chen;Raymond/Ruiming
x-mozilla-html:TRUE
org:RC Square
adr:;;;;;;U.S.A.
version:2.1
email;internet:rctwo@erols.com
title:CS
tel;fax:301-498-8959
tel;home:URL http://www.erols.com/rctwo/
tel;work:301-498-8959
note:Raymond Chui & Ruiming Chen Company
x-mozilla-cpt:;0
fn:Chui /Chen, Raymond/Ruiming
end:vcard
--------------AA5EF7FFD78B278F5BB9BAB8--