Use tuple as a foreign key

Keywords´╝Ü mysql sql

Question: 

Let's say i have a table named borrows like this one:

CREATE TABLE IF NOT EXISTS `borrows` 
( `memberID` int(11) NOT NULL ,
 `ISBN` int(11) NOT NULL ,
 `CopyNr` int(11) NOT NULL ,
  `date_of_borrowing` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `date_of_reminder` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 PRIMARY KEY (`memberID`,`ISBN`,`CopyNr`,`date_of_borrowing`) )
 ENGINE=InnoDB DEFAULT CHARSET=latin1

I want this table to have (ISBN,CopyNr) as a foreign key to an other table named copies.What i tried is this:

ALTER TABLE `borrows` ADD FOREIGN KEY (`ISBN`,`copyNr`) 
REFERENCES `copies`(`copyNr`) ON DELETE RESTRICT ON UPDATE RESTRICT;

This however gives me this error:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '(`ISBN`),(`copyNr`)) REFERENCES `copies`(`copyNr`) ON DELETE RESTRICT ON UPDATE ' at line 1

Should i create another column that would contain tuples of(ISBN,CopyNr) first?If yes,how can this happen?If not,how can i solve this?

Answers: 

ALTER TABLE `borrows` ADD FOREIGN KEY (`ISBN`,`copyNr`) 
REFERENCES `copies`(`ISBN`,`copyNr`) ON DELETE RESTRICT ON UPDATE RESTRICT;

You should have composite index on copies (ISBN,copyNr)