annotation proposal

[expired user #6262]'s profile image [expired user #6262] posted 12 years ago in General Permalink
the annotation in the heidisql query editor has to be written like the following way:
-- select * from...
namely,there must be a blank space after --,otherwise, if i enter
--select * from...,no blank space between -- and select,when execute this sql statement,the ide report error as follows:

"SQL Error(1064),You have an error in your SQL syntax; check the manual that corresponds to your mysql server version......"

while in the Microsoft sql server management studio,the two way are all right.


i think this should be fix in the heidisql ide.
kalvaro's profile image kalvaro posted 12 years ago Permalink
Well, that's the syntax for MySQL's SQL dialect. HeidiSQL should not deviate from it; otherwise, it'd be crazy.

http://dev.mysql.com/doc/refman/5.5/en/comments.html

«MySQL Server supports three comment styles:

- From a “#” character to the end of the line.

- From a “-- ” sequence to the end of the line. In MySQL, the “-- ” (double-dash) comment style requires the second dash to be followed by at least one whitespace or control character (such as a space, tab, newline, and so on). This syntax differs slightly from standard SQL comment syntax, as discussed in Section 1.8.5.5, “'--' as the Start of a Comment”.

- From a /* sequence to the following */ sequence, as in the C programming language. This syntax enables a comment to extend over multiple lines because the beginning and closing sequences need not be on the same line.»

Please login to leave a reply, or register at first.