This is a draft cheat sheet. It is a work in progress and is not finished yet.
Data Manipulation
COMMAND/OPTION |
DESCRIPTION |
INSERT |
Inserts row(s) into a table |
SELECT |
Selects attributes from rows in one or more tables (which columns appear in the output) |
FROM |
Specifies the database table(s) to retrieve and display data |
WHERE |
Filters the rows subject to some condition |
GROUP BY |
Forms groups of rows with the same column value |
HAVING |
Filters the groups subject to some condition |
ORDER BY |
Specifies the order of the output |
UPDATE |
Modifies an attribute's values in one or more table's rows |
DELETE |
Deletes one or more rows from a table |
COMMIT |
Permanently saves data changes |
ROLLBACK |
Restores data to their original values |
|
|
Ruby Styles & Formatting
variable names |
lowercase_readable_underscores |
indentation |
2 spaces |
|
|
|