Enter Commands
- A command normally consists of an SQL statement followed by a semicolon.
- There are some exceptions where a semicolon may be omitted.
QUIT is one of them.
USE is another.
- Terminating statements with a semicolon when not required does no harm.
- Often the semicolon is omitted by mistake.
- The command will not execute.
- The prompt will change from
mysql> to ->
- Indicating it is waiting for the completion of the command.
- MySQL keywords may be entered in any lettercase. The following queries are equivalent:
mysql> SELECT VERSION(), CURRENT_DATE;
mysql> select version(), current_date;
mysql> SeLeCt vErSiOn(), current_DATE;
- Use
\c to cancel the execution of a command that is being entered.
What are the MySQL prompts?
© 2007 John Michael Pierobon
Notes