Filippo,

you used a FOREIGN KEY syntax that MySQL/InnoDB does not support.

Look at the correct syntax here:

http://dev.mysql.com/doc/mysql/en/InnoDB_foreign_key_constraints.html

Best regards,

Heikki Tuuri
Innobase Oy
Foreign keys, transactions, and row level locking for MySQL
InnoDB Hot Backup - a hot backup tool for InnoDB which also backs up MyISAM tables
http://www.innodb.com/order.php


Order MySQL technical support from https://order.mysql.com/

----- Original Message ----- From: ""F.Balicchia"" <[EMAIL PROTECTED]>
Newsgroups: mailing.database.myodbc
Sent: Thursday, November 25, 2004 12:03 PM
Subject: enrror in foreign key reference



Hello i'd like to converte this DDL for mysql

ALTER TABLE MYTABLE_ROLE
       ADD  ( FOREIGN KEY (LOGIN)
                             REFERENCES MYTABLE_USER ) ;
------------

i wrote

ALTER TABLE MYTABLE_ROLE
ADD FOREIGN KEY (LOGIN) REFERENCES MYTABLE_USER ;

by it return me this error.
#1005 - Can't create table '.\mydb\#sql-4b4_63.frm'
(errno: 150).

I don't understand how i can resolve it.

thanks

--Filippo



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]



Reply via email to