MySQL CheatSheet


Short List of MySQL Commands

Conventions used here:

  • MySQL key words are shown in CAPS
  • User-specified names are in small letters
  • Optional items are enclosed in square brackets [ ]
  • Items in parentheses must appear in the command, along with the parentheses
  • Items that can be repeated as often as desired are indicated by an ellipsis …

Quoting in MySQL statments

  • Don’t quote database, table, or column names
  • Don’t quote column types or modifiers
  • Don’t quote numerical values
  • Quote (single or double) non-numeric values
  • Quote file names and passwords
  • User names are NOT quoted in GRANT or REVOKE statements, but they are quoted in other statements.
General Commands
USE database_name
     Change to this database. You need to change to some database when you first connect to MySQL.
     Lists all MySQL databases on the system.
SHOW TABLES [FROM database_name]
     Lists all tables from the…

View original post 1,386 more words