[ic] Composite Primary Key

Ammar T. Al-Sayegh ammar at kunet.com
Tue Jul 13 23:24:12 EDT 2004


Hi All,

Is it possible to have a composite primary key
for an Interchange table?

For example, say we have a table with 6 properties
such that the prop1,prop2,prop3 compose the primary
key. I was tempted to do something like the following
in dbconfig/mytable.mysql:

Database  mytable  PRIMARY KEY   prop1,prop2,prop3
Database  mytable  COLUMN_DEF   "prop1=char(12) NOT NULL"
Database  mytable  COLUMN_DEF   "prop2=char(6) NOT NULL"
Database  mytable  COLUMN_DEF   "prop3=SMALLINT"
Database  mytable  COLUMN_DEF   "prop4=char(24)"
Database  mytable  COLUMN_DEF   "prop5=char(24)"
Database  mytable  COLUMN_DEF   "prop6=char(24)"
Database  mytable  INDEX        prop4 prop5 prop6

Unfortunately, this doesn't seem work.

Any suggestion on how I can go about doing this?

Thanks.


-ammar



More information about the interchange-users mailing list