Created
June 5, 2014 08:14
-
-
Save stormpython/6ea444f2c65ff1a4ed76 to your computer and use it in GitHub Desktop.
Example MySQL schema
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
-- Example table schema | |
-- To import your schemas into your database, run: | |
-- `mysql -u username -p database < schema.sql` | |
-- where username is your MySQL username | |
-- Load data into table | |
-- LOAD DATA LOCAL INFILE 'country.csv' INTO TABLE world_index | |
-- FIELDS TERMINATED BY ',' | |
-- ENCLOSED BY '' | |
-- LINES TERMINATED BY '\n' | |
-- IGNORE 1 LINES | |
-- (country, median_age, gdp, edu_index); | |
CREATE TABLE IF NOT EXISTS world_index ( | |
id INT NOT NULL AUTO_INCREMENT, | |
country CHAR(50) NULL, | |
median_age DECIMAL(3, 1) NULL, | |
gdp INT NULL, | |
edu_index DECIMAL(4, 3) NULL, | |
PRIMARY KEY (id) | |
) ENGINE=InnoDB; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment