INSERT INTO `thegamestore`.`rental` (`rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`) VALUES ('1', '2015-10-21', '1', '3', '2015-10-27');
INSERT INTO `thegamestore`.`rental` (`rental_id`, `rental_date`, `inventory_id`, `customer_id`, `return_date`) VALUES ('2', '2015-11-22', '2', '3', '2015-12-01');
ALTER TABLE `thegamestore`.`platform`
CHANGE COLUMN `platform_id` `platform_id` SMALLINT(5) NOT NULL AUTO_INCREMENT COMMENT '' ;
where platform_id ='PS4'
UPDATE `thegamestore`.`games` SET `platform_id`='1' WHERE `game_titleID`='1';
UPDATE `thegamestore`.`games` SET `platform_id`='1' WHERE `game_titleID`='2';
ALTER TABLE `thegamestore`.`rental`
ADD INDEX `customers_ibfk_2_idx` (`customer_id` ASC) COMMENT '';
ALTER TABLE `thegamestore`.`rental`
ADD CONSTRAINT `customers_ibfk_2`
FOREIGN KEY (`customer_id`)
REFERENCES `thegamestore`.`customers` (`customer_id`)
ON DELETE NO ACTION
ON UPDATE NO ACTION;
https://www.dropbox.com/s/bo4tudzfkc79ygf/Screenshot%202015-12-07%2015.54.49.png?dl=0
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.