MySQL 命令行中的 ( ' > ) 符号是什么意思? [英] What does the ( ' > ) symbol mean in the command line in MySQL?
问题描述
我是 sql 新手,出于某种原因,我习惯在命令行中看到的箭头符号 ( -> ) 现在显示为 ( '> )不接受命令.这是什么意思,我如何回到 ( -> ) ?
谢谢
这意味着它将后面的任何输入视为字符串文字的一部分,直到遇到一个(n 未转义的)字符串终止引号 '
字符.
发生这种情况是因为您之前使用这样的字符串终止引号字符开始字符串文字.例如:
<前>mysql>选择 foo->从表->WHERE bar LIKE 'somestring'>这仍然是 somestring 的一部分'->;I'm new to sql and for some reason, the arrow symbol ( -> ) that I am used to seeing in teh command line, which mean it is ready for input, is now displayed as ( '> ) and it does not accept commands. What does it mean and how do I get back to ( -> ) ?
Thanks
It means that it is treating any input which follows as part of a string literal, until it encounters a(n unescaped) string termination quote '
character.
This will have happened because you previously began the string literal with such a string termination quote character. For example:
mysql> SELECT foo -> FROM tbl -> WHERE bar LIKE 'somestring '> this is still part of somestring' -> ;
这篇关于MySQL 命令行中的 ( &#39; &gt; ) 符号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!