Skip to content

Instantly share code, notes, and snippets.

@GedMullen
Created September 22, 2016 13:38
Show Gist options
  • Save GedMullen/84e27db349b477822fbb14b431a05f6f to your computer and use it in GitHub Desktop.
Save GedMullen/84e27db349b477822fbb14b431a05f6f to your computer and use it in GitHub Desktop.
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