Home>Article>Database> How to cancel wrong command in MySQL?

How to cancel wrong command in MySQL?

黄舟
黄舟 Original
2017-07-31 15:41:09 2166browse

When using MySQL, sometimes I accidentally enter the wrong command when entering it, but find that I cannot exit the error state. So, how can you cancel the wrong command?

How to cancel wrong command in MySQL?

1. Common command line errors

1. First, you must find out the cause of the error. Common causes of errors are:

1) Forgot to enter the semicolon at the end.

How to cancel wrong command in MySQL?


2. The ' character

was entered incorrectly

How to cancel wrong command in MySQL?

#3) The " character was entered incorrectly.

How to cancel wrong command in MySQL?

2. Solution

1. When an incorrect command cannot be exited, in most cases it is because MySQ believes that the command line has not ended yet. In this case, sometimes even if you type quit, you will not be able to exit. Common mistakes, the solutions are:

##1) Add a semicolon.

2) Since the ' and " signs appear in pairs in MySQL, when you type the ' or " sign incorrectly, you need to complete the other half to exitHow to cancel wrong command in MySQL?#.

##3) After exiting, you only need to enter the correct command again to execute it.

How to cancel wrong command in MySQL?##Notes

When you enter '," incorrectly, you must type the other half to exit the command.

The above is the detailed content of How to cancel wrong command in MySQL?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn