MySQL Commenting Gotcha

Posted on 2010/01/20 by Randall.
Categories: Uncategorized.

The — comment operator must be followed by a space. So if you have a comment like a header up top…like below


-- mysql engine v1.2
-- this is more commenttt
-------------------------
-- further comments below

This will cause an error on line 3. The second line has no space in it at all.  At least they have a reasonable error message for this, but it’s easily missed if you don’t read the error message.

no comments yet.

Leave a comment

Names and email addresses are required (email addresses aren't displayed), url's are optional.

Comments may contain the following xhtml tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>