MySQL 命令行中的 ( ' > ) 符号是什么意思? [英] What does the ( ' > ) symbol mean in the command line in MySQL?

查看:98
本文介绍了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 命令行中的 ( &amp;#39; &amp;gt; ) 符号是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆