Re: Foreign key on multiple columns

2013-03-21 Thread Abhishek Choudhary
sage - From: Peter Brawley To: mysql@lists.mysql.com Cc: Sent: Thursday, 21 March 2013 8:14 PM Subject: Re: Foreign key on multiple columns On 2013-03-21 8:12 AM, Norah Jones wrote: > I'm trying to create a foreign key on two columns but getting error... > > Here's what I tri

Re: Foreign key on multiple columns

2013-03-21 Thread shawn green
On 3/21/2013 12:43 PM, Abhishek Choudhary wrote: CREATE TABLE test2 ( ID INT NOT NULL AUTO_INCREMENT, col1 INT NOT NULL, col2 INT NOT NULL, PRIMARY KEY (ID), CONSTRAINT fk FOREIGN KEY (col1, col2) REFERENCES test1(ID, ID

Re: Foreign key on multiple columns

2013-03-21 Thread Peter Brawley
On 2013-03-21 8:12 AM, Norah Jones wrote: I'm trying to create a foreign key on two columns but getting error... Here's what I tried: CREATE TABLE test2 ( ID INT NOT NULL AUTO_INCREMENT, col1 INT NOT NULL, col2 INT NOT NULL, PRIMARY KEY (ID), CONSTRAINT f

Re: Can i create a composite foreign key(on multiple columns) in a table.

2003-06-10 Thread Egor Egorov
san <[EMAIL PROTECTED]> wrote: > > Is it possible to create a composite foreign key (on multiple columns > as in primary key enabled tables) in a table. > > MySQl manuals defines the syntax as: > > The syntax of a foreign key constraint definition in InnoDB: >

Re: Can i create a composite foreign key(on multiple columns) in a table.

2003-06-07 Thread Becoming Digital
]> Sent: Friday, 06 June, 2003 09:05 Subject: Can i create a composite foreign key(on multiple columns) in a table. Hi, Is it possible to create a composite foreign key (on multiple columns as in primary key enabled tables) in a table. MySQl manuals defines the syntax as: The syntax

Can i create a composite foreign key(on multiple columns) in a table.

2003-06-06 Thread san
Hi, Is it possible to create a composite foreign key (on multiple columns as in primary key enabled tables) in a table. MySQl manuals defines the syntax as: The syntax of a foreign key constraint definition in InnoDB: [CONSTRAINT symbol] *FOREIGN KEY (index_col_name