简体   繁体   English

如何确定MySQL中的当前分隔符?

[英]How to determine current delimiter in MySQL?

Is there a way to determine the current delimiter in MySQL? 有没有办法确定MySQL中的当前分隔符?

The delimiter can be set like this: DELIMITER // 分隔符可以这样设置: DELIMITER //

Or like this: \\d // 或者像这样: \\d //

But how do you get the current delimiter? 但是你如何获得当前的分隔符?

I tried browsing the results of SHOW STATUS and SHOW VARIABLES to no avail. 我试着浏览SHOW STATUSSHOW VARIABLES的结果无济于事。

If you just want to know which delimiter is set right now \\s will show you that: 如果您只是想知道现在设置了哪个分隔符\\s将显示:

Using delimiter: // 使用分隔符://

The delimiter is not a keyword or command on the server (it's not even a reserved keyword), so there is absolutely no way to get it back from the server (since the server doesn't know about it) 分隔符不是服务器上的关键字或命令(它甚至不是保留关键字),因此绝对没有办法从服务器返回它(因为服务器不知道它)

It's used by the client (and the client must support it), and only by the client. 它由客户端使用 (客户端必须支持它),并且仅由客户端使用。

If you try to send a DELIMITER // from a client that doesn't support it, you'll get a syntax error 如果您尝试从不支持它的客户端发送DELIMITER // ,则会出现语法错误

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM