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.

Revisions

  1. futoase created this gist Oct 9, 2018.
    15 changes: 15 additions & 0 deletions create_test_db.sql
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    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);