Skip to content

Instantly share code, notes, and snippets.

@sebgates
Created September 12, 2017 19:40
Show Gist options
  • Save sebgates/b6ede2b3598541bc5179e57bed8fe54c to your computer and use it in GitHub Desktop.
Save sebgates/b6ede2b3598541bc5179e57bed8fe54c to your computer and use it in GitHub Desktop.
-- Table structure for table `products`
--
CREATE TABLE `products` (
`productID` int(11) NOT NULL,
`categoryID` int(11) NOT NULL,
`productCode` varchar(10) NOT NULL,
`productName` varchar(255) NOT NULL,
`date` date NOT NULL,
`listPrice` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `products`
--
INSERT INTO `products` (`productID`, `categoryID`, `productCode`, `productName`, `date`, `listPrice`) VALUES
(13, 3, '3456', 'Sprinting socks', '2017-08-09', '4.00'),
(14, 3, '9876545', 'Hockey Socks', '2017-07-20', '7.00'),
(15, 3, '876543', 'Running Socks', '2017-06-22', '4.00'),
(17, 3, '876545', 'Football Socks', '2017-07-21', '6.00'),
(18, 3, '987654', 'Kung Fu Slippers', '2017-08-10', '12.00'),
(19, 1, '345678', 'Boxing Shorts', '2017-08-04', '15.00'),
(20, 1, '4567567', 'Running Shorts', '2017-08-07', '8.00'),
(21, 1, '23489', '3/4 length Shorts', '2017-08-10', '19.00'),
(22, 2, '222222', 'Hockey Mask', '2017-08-16', '40.00'),
(23, 2, '8783929', 'Cricket Helmet', '2017-08-01', '78.00'),
(24, 2, '8926356', 'Swimming Hat', '2017-08-03', '9.00');
--
-- Indexes for dumped tables
-- Indexes for table `products`
--
ALTER TABLE `products`
ADD PRIMARY KEY (`productID`),
ADD UNIQUE KEY `productCode` (`productCode`);
--
-- AUTO_INCREMENT for dumped tables
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
MODIFY `productID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment