SQL Reference ------------------------------- Create a table CREATE TABLE tableName ( columnName1 dataType, columnName2 dataType, .......) Create index CREATE UNIQUE INDEX indexName ON tableName (columnName) Delete index DROP INDEX tableName.indexName Delete table DROP TABLE tableName Select SELECT columnName(s) FROM tableName Select with GroupBy SELECT column,SUM(column) FROM table GROUP BY column Insert new rows INSERT INTO tableName (column1, column2,...) VALUES (value1, value2,....) Update UPDATE tableName SET columnName = newValue WHERE columnName = someValue Delete rows DELETE FROM tableName WHERE columnName = someValue http://www.w3schools.com/sql/default.asp DataTypes: ---------- Hold integers only. The maximum number of digits are specified in parenthesis. ----- integer(size) int(size) smallint(size) tinyint(size) Hold numbers with fractions. The maximum number of digits are specified in "size". The maximum number of digits to the right of the decimal is specified in "d". ----- decimal(size,d) numeric(size,d) Holds a fixed length string (can contain letters, numbers, and special characters). The fixed size is specified in parenthesis. ----- char(size) Holds a variable length string (can contain letters, numbers, and special characters). The maximum size is specified in parenthesis. ----- varchar(size) Holds a date ----- date(yyyymmdd)