On Wed, May 19, 2010 at 12:02 PM, Shawn Green <shawn.l.gr...@oracle.com>wrote:

> Victor Subervi wrote:
>
>> On Wed, May 19, 2010 at 10:59 AM, Shawn Green <shawn.l.gr...@oracle.com
>> >wrote:
>>
>>  Shawn Green wrote:
>>
>>

> look again closely at your FK definitions. The pattern should be
>>>
>>
> FOREIGN KEY (child_table_column) REFERENCES
> parent_table(parent_table_column)
>
> Yours appears to be something else.


And indeed it was. This works:

create table if not exists Passengers (id int(11) auto_increment primary
key, flights_id int(11) not null, customer_id int(11) not null, foreign key
(id) references Flights (flights_id), foreign key (id) references Customers
(customer_id), name varchar(40), weight tinyint(3)) engine=InnoDB;

Yay! Thanks!
V

>
>
>
> --
> Shawn Green
> MySQL Principle Technical Support Engineer
> Oracle USA, Inc.
> Office: Blountville, TN
>

Reply via email to