I think, the two formats you raised are both that of
foreign key constraint:
when there is a composite foreign key (more than 1
attribute in a table involved), you must use "foreign
key" clause.
if there is only a simple foreign key, you can use
either format.
--- Egor Egorov <[EMAIL PROTECTED]
rb <[EMAIL PROTECTED]> wrote:
> I am a new user trying to learn mysql (using InnoDB tables, mysql
> version 3.23.54) and to create a useful database for a project I am
> working on. In trying to understand how to use foreign keys effectively,
> I studied examples at http://sqlzoo.net - "A Gentle In
I am a new user trying to learn mysql (using InnoDB tables, mysql
version 3.23.54) and to create a useful database for a project I am
working on. In trying to understand how to use foreign keys effectively,
I studied examples at http://sqlzoo.net - "A Gentle Introduction to SQL"
I am trying to und