Skip to content

Instantly share code, notes, and snippets.

@futoase
Created October 9, 2018 14:09
Show Gist options
  • Save futoase/cc7fc96ca9d4b6e07e9e85648d18ca03 to your computer and use it in GitHub Desktop.
Save futoase/cc7fc96ca9d4b6e07e9e85648d18ca03 to your computer and use it in GitHub Desktop.
CREATE DATABASE IF NOT EXISTS test_db;
CREATE TABLE IF NOT EXISTS test_db.users (
id INT AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
age INT NOT NULL,
sex TINYINT NOT NULL DEFAULT 0,
PRIMARY KEY (id)
);
INSERT INTO test_db.users (name, age, sex)
VALUES ('taro', 18, 1),
('jiro', 17, 1),
('hanako', 21, 2),
('himawari', 20, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment