Created
September 22, 2016 13:38
-
-
Save GedMullen/84e27db349b477822fbb14b431a05f6f 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
DROP DATABASE IF EXISTS ged; | |
CREATE DATABASE ged; | |
USE ged; | |
CREATE TABLE customers ( | |
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY , | |
name VARCHAR(100) NOT NULL , | |
email VARCHAR(100) NOT NULL , | |
mobile VARCHAR(100) NOT NULL | |
); | |
CREATE TABLE bets ( | |
bet_id INT NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
customer_id INT NOT NULL, | |
description VARCHAR(100), | |
odds INT, | |
amount INT, | |
FOREIGN KEY (customer_id) REFERENCES customers(id) | |
); | |
SHOW TABLES; | |
DESCRIBE customers; | |
DESCRIBE bets; | |
SELECT * FROM customers LIMIT 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment