Hi Victoria, I thought so, but also if I try somthing similar like:
ALTER TABLE db ADD FOREIGN KEY (Host) REFERENCES user (Host); I get the same error. BTW: Can I change the order of the keys ? Best regards Nils Valentin 2003年 6月 11日 水曜日 17:17、Victoria Reznichenko さんは書きました: > "Nils Valentin" <[EMAIL PROTECTED]> wrote: > > I believe that the User column is indexed (please see below): > > > > show index from user; > > +-------+------------+----------+--------------+-------------+----------- > >+-------------+----------+--------+------+------------+---------+ > > > > | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation > > | | > > > > Cardinality | Sub_part | Packed | Null | Index_type | Comment | > > +-------+------------+----------+--------------+-------------+----------- > >+-------------+----------+--------+------+------------+---------+ > > > > | user | 0 | PRIMARY | 1 | Host | A > > | | > > > > 15 | NULL | NULL | | BTREE | | > > > > | user | 0 | PRIMARY | 2 | User | A > > | | > > > > 15 | NULL | NULL | | BTREE | | > > +-------+------------+----------+--------------+-------------+----------- > >+-------------+----------+--------+------+------------+---------+ > > > > > > Any comments appreciated. > > If you have multi-column index, 'User' must be the first part of the index. > In your case User is the second part of index. > > > -- > For technical support contracts, goto https://order.mysql.com/?ref=ensita > This email is sponsored by Ensita.net http://www.ensita.net/ > __ ___ ___ ____ __ > / |/ /_ __/ __/ __ \/ / Victoria Reznichenko > / /|_/ / // /\ \/ /_/ / /__ [EMAIL PROTECTED] > /_/ /_/\_, /___/\___\_\___/ MySQL AB / Ensita.net > <___/ www.mysql.com -- --- Valentin Nils Internet Technology E-Mail: [EMAIL PROTECTED] URL: http://www.knowd.co.jp Personal URL: http://www.knowd.co.jp/staff/nils -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]