是否可以在A&#x27 ;;&#x27之后写评论。在SQL查询中?

发布于 2025-01-24 23:24:50 字数 229 浏览 3 评论 0原文

在此代码中:

SELECT * FROM Customers
ORDER BY CustomerName ASC; -- some comment

如果评论不是查询/代码的一部分,为什么我不能在'; 'char之后编写它? (只是在W3Schools示例DB中尝试过)

如何在查询末尾(如果有的话)创建注释?

提前致谢

In this code:

SELECT * FROM Customers
ORDER BY CustomerName ASC; -- some comment

If a comment is not part of the query/code, why can't I write it after the ';' char?
(Just tried it in w3schools example DB)

How can I otherwise create comments at the end of the query, if at all?

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

满天都是小星星 2025-01-31 23:24:50

如果您有复杂的SQL-Script,这些评论使其可以更好地阅读,从而有意义。如果您只需要查询,则该评论毫无用处。

If you have a complex SQL-Script, the comments make it better readable so it make sense. If you need the query only once the comment is useless.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文