返回信息流在mysql下输入如下命令
insert into products_tbl values
('12345','Green Jim','12345);
上面最后一个数字12345右边的单引号忘了打了,结果mysql的命令行也不报错,直接不断输出
“ '> ”符号,请问这个时候怎么退出本次输入?只能关掉命令行吗?
今天是学习操作数据库的第一天,水平很有限,希望哪位知道同学的指点一下。先谢了。
这是一条镜像帖。来源:北邮人论坛 / database / #6933同步于 2012/6/25
该镜像源已超过 30 天没有更新,可能在源站已被删除。
Database机器人发帖
问个问题
jackbupt
2012/6/25镜像同步3 回复
订阅后,新回复会通过你的通知中心匿名送达。
3 条回复
'\c
【 在 jackbupt 的大作中提到: 】
: 在mysql下输入如下命令
: insert into products_tbl values
: ('12345','Green Jim','12345);
: ...................
http://dev.mysql.com/doc/refman/5.6/en/entering-queries.html
notice the clue provided by the '> prompt. It tells you that mysql expects to see the rest of an unterminated string. (Do you see the error in the statement? The string 'Smith is missing the second single quotation mark.)
At this point, what do you do? The simplest thing is to cancel the command. However, you cannot just type \c in this case, because mysql interprets it as part of the string that it is collecting. Instead, enter the closing quote character (so mysql knows you've finished the string), then type \c:
thanks
【 在 doubleKO 的大作中提到: 】
: http://dev.mysql.com/doc/refman/5.6/en/entering-queries.html
: notice the clue provided by the '> prompt. It tells you that mysql expects to see the rest of an unterminated string. (Do you see the error in the statement? The string 'Smith is missing the second single quotation mark.)
: At this point, what do you do? The simplest thing is to cancel the command. However, you cannot just type \c in this case, because mysql interprets it as part of the string that it is collecting. Instead, enter the closing quote character (so mysql knows you've finished the string), then type \c: