Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TABLE IF NOT EXISTS `firstModel`.`invoice` (
- `idinvoice` INT NOT NULL AUTO_INCREMENT,
- `userid` INT NOT NULL,
- `productid` INT NOT NULL,
- `cost` DECIMAL(10,2) NOT NULL,
- PRIMARY KEY (`idinvoice`),
- INDEX `user_idx` (`userid` ASC) VISIBLE,
- CONSTRAINT `user`
- FOREIGN KEY (`userid`)
- REFERENCES `firstModel`.`user` (`id`)
- ON DELETE NO ACTION
- ON UPDATE NO ACTION)
- ENGINE = InnoDB
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement