SQL query field can't begin by a comment
See original GitHub issueSQL comments are very useful to explain the meaning of the query. It’s currently impossible to put it at the beginning of the field as seen on the screen capture: it leads to an error: Statement must be a SELECT
.
It would be great to make it possible because:
- as the request is the title of the page:
- it eases the search with search engines
- it eases the search in the browsers’ url field
- it acts as a kind of title: the global meaning of the query is immediately understandable
- some tools, such as Slack, are shortening long URLs and displaying the beginning of the URLs (eg.
https://example.org/products?sql=select+%28length%28data_quality_errors_ta[...]+%21%3D+%22%22+group+by+NB_of_issues+order+by+NB_of_issues+desc+limit+200
)
Beginning a query with a comment is possible with SQLite.
Issue Analytics
- State:
- Created a year ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Comments Within SQL Statements
Begin the comment with -- (two hyphens). Proceed with the text of the comment. This text cannot extend to a new line. End...
Read more >SQL Comments - W3Schools
Comments are used to explain sections of SQL statements, or to prevent execution of SQL statements. ... Multi-line comments start with /* and...
Read more >sql - Why can't I see comment on column? - Stack Overflow
You need to query Data Dictionary view USER_COL_COMMENTS to display comments on the columns of the tables and views owned by the current ......
Read more >Never, Ever, Ever Start T-SQL Comments with Two Dashes
Never, ever use two dashes. Never. ... And you can't tell where the query really ends. This REALLY causes problems with real-world-size queries...
Read more >How to Enter SQL Comments - IBM
The following table shows the SQL comment indicators that you can enter in your code. Here a Y in a column signifies that...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think mine has a better pattern for handling
/* ... anything in here that isn't */ ... */
Yeah we should fix this.
https://www.sqlite.org/lang_comment.html - SQLite also supports
-- style
comments.I like how explicit the documentation is here: