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, ...)*
                 REFERENCES table_name (index_col_name, ...)
                 [ON DELETE {CASCADE | SET NULL | NO ACTION
                             | RESTRICT}]
                 [ON UPDATE {CASCADE | SET NULL | NO ACTION
                             | RESTRICT}]



Kindly give solutions to my query.

Thanks for your time

Regards
San

Reply via email to