Entering Queries A query need not be given all on a single line, so lengthy queries that require several lines are not a problem.  mysql  determines where your statement ends by looking for the terminating semicolon, not by looking for the end of the input line. (In other words,  mysql  accepts free-format input: it collects input lines but does not execute them until it sees the semicolon.) Here is a simple multiple-line statement: In this example, notice how the prompt changes from  mysql>  to  ->  after you enter the first line of a multiple-line query. This is how  mysql  indicates that it has not yet seen a complete statement and is waiting for the rest. The prompt is your friend, because it provides valuable feedback. If you use that feedback, you can always be aware of what  mysql  is waiting for. If you decide you do not want to execute a query that you are in the process of entering, cancel it by typing \c : Here, too, notice the prompt. It switches back to  mysql>  after you type  \c , providing feedback to indicate that  mysql  is ready for a new query. The following table shows each of the prompts you may see and summarizes what they mean about the state that  mysql  is in. Multiple-line statements commonly occur by accident when you intend to issue a query on a single line, but forget the terminating semicolon. In this case,  mysql  waits for more input: mysql>  SELECT USER() -> mysql>  SELECT ->  USER() ->  \c mysql> mysql>  SELECT ->  USER() ->  , ->  CURRENT_DATE; +---------------------+ 1 row in set (0.00 sec) +---------------+--------------+ | USER() | CURRENT_DATE | +---------------+--------------+ | jon@localhost | 2018-08-24 | +---------------+--------------+ Prompt Meaning mysql> Ready for new query -> Waiting for next line of multiple-line query ’> Waiting for next line, waiting for completion of a string that began with a single quote ( ’ ) "> Waiting for next line, waiting for completion of a string that began with a double quote ( " ) ‘> Waiting for next line, waiting for completion of an identifier that began with a backtick ( ‘ ) /*> Waiting for next line, waiting for completion of a comment that began with  /* 306