Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 0.55 KB | None | 0 0
  1. CREATE TABLE IF NOT EXISTS `court`.`products` (
  2.   `id` INT NOT NULL AUTO_INCREMENT ,
  3.   `merchant` INT(10) NOT NULL ,
  4.   `price` DECIMAL(5,2) NULL ,
  5.   `conv_fee` DECIMAL(5,2) NULL ,
  6.   `product_name` VARCHAR(45) NOT NULL ,
  7.   PRIMARY KEY (`id`) ,
  8.   INDEX `merchant` (`merchant` ASC) ,
  9.   CONSTRAINT `merchant`
  10.     FOREIGN KEY (`merchant` )
  11.     REFERENCES `court`.`merchants` (`id` )
  12.     ON DELETE RESTRICT
  13.     ON UPDATE CASCADE)
  14. ENGINE = InnoDB
  15.  
  16. -- Gives me the following error:
  17. -- #1005 - Can't create table 'court.products' (errno: 150) (Details...)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement