Skip to content

Instantly share code, notes, and snippets.

@tiagomatosweb
Created December 28, 2019 00:50
Show Gist options
  • Save tiagomatosweb/c8f8445ed6bd258bc68a86a6819587ab to your computer and use it in GitHub Desktop.
Save tiagomatosweb/c8f8445ed6bd258bc68a86a6819587ab to your computer and use it in GitHub Desktop.
mysql
CREATE TABLE shop (
article INT UNSIGNED DEFAULT '0000' NOT NULL,
dealer CHAR(20) DEFAULT '' NOT NULL,
price DECIMAL(16,2) DEFAULT '0.00' NOT NULL,
PRIMARY KEY(article, dealer));
INSERT INTO shop VALUES
(1,'A',3.45),(1,'B',3.99),(2,'A',10.99),(3,'B',1.45),
(3,'C',1.69),(3,'D',1.25),(4,'D',19.95);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment