如何在Clickhouse SQL查询中添加评论
我遇到了这个奇怪的事情,想了解您如何处理它。
我正在使用摩纳哥编辑器编写SQL查询,然后使用Node Clickhouse库来运行查询,因此,在编辑器中,用户输入此查询:
-- Explain
select * from table 1
而发送到Clickhouse的查询就是这样:
-- Explain\nselect * from table 1
但是,当运行此问题时,我收到了错误,
:"SyntaxError: Unexpected number in JSON at position 2\n at pa...
似乎是注释了。这引起了错误。
您能告诉我如何在查询中发表评论并发送到Clickhouse运行吗?
I met this strange thing and want to understand how you handle it.
I am using Monaco editor to write sql query and then using node clickhouse library to run the query, so, in the editor, user entered this:
-- Explain
select * from table 1
and the query sent to clickhouse is this:
-- Explain\nselect * from table 1
But when running this, I got error
:"SyntaxError: Unexpected number in JSON at position 2\n at pa...
Seemed the comment here is causing the error.
Can you tell me how to put comment into the query and send to clickhouse to run?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否已经找到了解决问题的解决方案?
否则,我可以建议您使用“多行注释”,如下所示:
达到所需结果的问题。
Have you already found the solution to your problem?
Otherwise I can advise you to use the "multi-line comments" as follows:
It gets around the problem to achieve the desired result.