Last active
May 1, 2019 00:53
-
-
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.
This file contains hidden or 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
| # 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