('>)符号在MySQL中的命令行中是什么意思?
问题描述:
我刚接触sql,由于某种原因,我习惯于在命令行中看到的箭头符号( - >),这意味着它已准备好输入,现在显示为('>),它不接受命令。
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 ( -> ) ?
感谢
答
这意味着它正在处理作为字符串文字一部分的任何输入,直到它遇到一个(n未转义)字符串终止引用'
。
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'
-> ;