What is the use of ‘\c’ option while writing MySQL statements?

MySQLMySQLi Database

‘\c’ option means ‘clear’ and is used to clear the current input. Suppose if we do not want to execute a command that we are entering, then we can use a clear \c option which clears the current input. For example, the use of \c option can be done as follows −

mysql> Select *
    -> from\c

In the example above, when we use \c in a statement, MySQL clears the current input and returns back to the MySQL prompt for accepting other statements.

Published on 22-Feb-2018 11:32:22