You need supp_cd to be first in an index. TryLooks like that does not work. BTW this does work (without adding a separate index) in postgres.
ALTER TABLE hpi_supp_agmt ADD INDEX supp_ind (supp_cd);
then try to add your foreign key constraint again.
Michael
mysql> alter table hpi_supp_agmt add index i1hpisuppagmt (supp_cd);
Query OK, 28635 rows affected (4.89 sec)
Records: 28635 Duplicates: 0 Warnings: 0
mysql> alter table hpi_supp_agmt add constraint f1hpisuppagmt foreign key (hpi_no) references hpi;
ERROR 1005 (HY000): Can't create table './gem/#sql-c3f_2.frm' (errno: 150)
mysql>
-- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]