Menu

#60 Executing SQL with comments

open
nobody
None
5
2003-12-31
2003-12-31
Chuck May
No

In the SQL editor, if I have SQL that looks like this:

-- comment
select count(*) from table

If I execute that with nothing highlighted, it works
perfectly.

If I execute that with just the "select" line
hightlighted, it works fine.

If I select it with both lines highlighted, I get no
results. It seems like when the highlighted text
starts with a comment, then the whole text is thought
of as a comment. It should only be looking at the
first line as a comment since it is a one-line comment.

Thanks Andrea.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB