Skip to content

Instantly share code, notes, and snippets.

@otkrsk
Last active May 1, 2019 00:53
Show Gist options
  • Save otkrsk/7557717 to your computer and use it in GitHub Desktop.
Save otkrsk/7557717 to your computer and use it in GitHub Desktop.
Quick & dirty snippet to create a MySQL database and table when I'm too lazy to type.
# Create Database
CREATE DATABASE `database_name`;
# Create Table
CREATE TABLE `table_name` (
contact_id INT(10) NOT NULL AUTO_INCREMENT,
name VARCHAR(40),
birthdate DATE,
PRIMARY KEY (contact_id)
);
# Insert Into Table
INSERT INTO `table_name` (field1, field2) VALUES ('Johnny Bravo', '19-09-2013');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment