[ic] Composite Primary Key
mike at perusion.com
Wed Jul 14 00:02:04 EDT 2004
Quoting Ammar T. Al-Sayegh (ammar at kunet.com):
> 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?
This capability has been added in 5.3, but is not in 5.2.
Perusion -- Expert Interchange Consulting http://www.perusion.com/
phone +1.765.647.1295 tollfree 800-949-1889 <mike at perusion.com>
Fast, reliable, cheap. Pick two and we'll talk. -- unknown
More information about the interchange-users