You’ve already seen the SHOW command, which lists tables, databases, and many other items. The commands you’ll use most often are listed in following table.
|ALTER||DATABASE, TABLE||Alter DATABASE or TABLE|
|BACKUP||TABLE||Back up TABLE|
|CREATE||DATABASE, TABLE||Create DATABASE or TABLE|
|DELETE||(expression with TABLE & ROW)||Create ROW from TABLE|
|DESCRIBE||TABLE||Describe the TABLE’S columns|
|DROP||DATABASE,TABLE||Delete DATABASE or TABLE|
|GRANT||(user details)||Change user privileges|
|HELP (\h, \?)||item||Display help on item|
|INSERT||(expression with data)||Insert data|
|QUIT (\q)||Same as EXIT|
|SHOW||(too many items to list)||List item’s details|
|SOURCE||filename||Execute commands from filename|
|STATUS (\s)||Display current status|
|UPDATE||(expression with data)||Update an existing record|
We’ll cover most of these as we proceed, but first, you need to remember a couple of points about MySQL commands:
• SQL commands and keywords are case-insensitive. CREATE, create, and CrEaTe all mean the same thing. However, for the sake of clarity, the recommended style is to use uppercase.
• Table names are case-sensitive on Linux and Mac OS X, but case-insensitive on Windows. So for portability purposes, you should always choose a case and stick to it. The recommended style is to use lowercase for tables.