gpt4 book ai didi

mysql - 如何退出msql执行过程?提交不起作用

转载 作者:行者123 更新时间:2023-11-30 00:45:40 26 4
gpt4 key购买 nike

完成 sql 命令后,我没有收到任何错误,但由于某种原因,我尝试提交,但这没有帮助。我无法退出执行过程。我对 sql 有点生疏了。

例如。

INSERT INTO 'login.'Users' (
'> 'id',
'> 'username',
'> 'password',
'> 'user_email'
'> )
'>
'> VALUES ( NULL, 'manager', 'password', 'admin@sss.com' );
'> VALUES ( NULL, 'Bill Hick', '2edW', 'puo@sssc.com' );
'> VALUES ( NULL, 'Jim Burn', 'dsdFfrr', 'jim@sscs.com' );
'> VALUES ( NULL, 'Rob Slater', 'v$5wwc', 'rob@wsd.com' );
'> VALUES ( NULL, 'Sandra Ante', 'Hysdp&', 'sa@asd.com' );
'> VALUES ( NULL 'Peter Piper' 'sdPn&s' 'pp9@sasd.com' );
'>
'>
'>
'>
'>
.
.
.
.

事情还在继续......

最佳答案

您需要这样做才能退出执行过程

mysql > '\c

摘自某本书

The mysql> prompt displayed by mysql is just one of several different prompts that you might see when entering queries. Each type of prompt has a functional significance because mysql varies the prompt to provide information about the status of the statement you're entering. The following table shows each of these prompts.

Prompt            Meaning
mysql> Ready for new statement
-> Continue entering statement until a terminator like is entered
'> Waiting for end of single-quoted string (')
"> Waiting for end of double-quoted string or identifier (")
`> Waiting for end of backtick-quoted identifier (`)
/*> Waiting for end of C-style comment (*/)

The mysql> prompt is the main (or primary) prompt. It signifies that mysql is ready for you to begin entering anew statement.If in fact you have mistyped the current statement by forgetting to close a quote, you can cancel the statement by entering the closing quote followed by the \c clear-statement command.

并更改INSERT INTO AS

INSERT INTO Users(id,username,password,user_email) 
VALUES
( NULL, 'manager', 'password', 'admin@sss.com' ),
( NULL, 'Bill Hick', '2edW', 'puo@sssc.com' ),
( NULL, 'Jim Burn', 'dsdFfrr', 'jim@sscs.com' ),
( NULL, 'Rob Slater', 'v$5wwc', 'rob@wsd.com' ),
( NULL, 'Sandra Ante', 'Hysdp&', 'sa@asd.com' ),
( NULL, 'Peter Piper', 'sdPn&s', 'pp9@sasd.com' );

关于mysql - 如何退出msql执行过程?提交不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21377435/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com