Expand|Select|Wrap|Line Numbers
- CREATE TABLE `norm`.`sphone` (
- `sid` INT NOT NULL,
- `phone` VARCHAR(45) NOT NULL,
- PRIMARY KEY (`sid`, `phone`),
- CONSTRAINT `sid`
- FOREIGN KEY ()
- REFERENCES `norm`.`staff` ()
- ON DELETE RESTRICT
- ON UPDATE RESTRICT);
ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
REFERENCES `norm`.`staff` ()
ON DELETE RESTRICT
ON UPDATE RESTRICT' at line 6
SQL Statement:
CREATE TABLE `norm`.`sphone` (
`sid` INT NOT NULL,
`phone` VARCHAR(45) NOT NULL,
PRIMARY KEY (`sid`, `phone`),
CONSTRAINT `sid`
FOREIGN KEY ()
REFERENCES `norm`.`staff` ()
ON DELETE RESTRICT
ON UPDATE RESTRICT)
i can not understand the error and don't know how to solve it?
also, would anyone tell me how to fill the tables with data?