Skip to content

Instantly share code, notes, and snippets.

@brendanashworth
Created June 27, 2014 01:45
Show Gist options
  • Save brendanashworth/ac0a0c27f459778e17f4 to your computer and use it in GitHub Desktop.
Save brendanashworth/ac0a0c27f459778e17f4 to your computer and use it in GitHub Desktop.
MySQL command reference
# Select, insert, update, delete
SELECT * FROM `my_table` WHERE `my_field` = 'my_value';
INSERT INTO `my_table` (my_field, another_field) VALUES ('myFieldValue', 'AnotherFieldValue');
UPDATE `my_table` SET `my_field` = 'aNewValue';
DELETE FROM `my_table` WHERE `my_field` = 'a_special_value';
# Get the schema of sorts for a table
SHOW COLUMNS FROM `my_table`;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment