Created
December 19, 2019 03:49
-
-
Save emaalouf/9c7af538e42c725a67bf66858720af6a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS Sale ( | |
`SaleID` INT, | |
`SaleDate` DATETIME, | |
`Tax` NUMERIC(2, 0), | |
`Total` VARCHAR(3) CHARACTER SET utf8, | |
PRIMARY KEY(SALEID), | |
FOREIGN KEY(SALEID), | |
); | |
CREATE TABLE IF NOT EXISTS Sale_Item ( | |
`SaleID` INT, | |
`SaleItemID` INT, | |
PRIMARY KEY(SALEID), | |
FOREIGN KEY(SALEID), | |
); | |
CREATE TABLE IF NOT EXISTS ITEM ( | |
`ITEMID` INT, | |
`Name` VARCHAR(4) CHARACTER SET utf8, | |
`Cost` VARCHAR(3) CHARACTER SET utf8, | |
`Price` VARCHAR(3) CHARACTER SET utf8, | |
PRIMARY KEY(ITEMID), | |
FOREIGN KEY(ITEMID), | |
); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment