David,

> I would like to suggest that a third condition be included in this list. It
> seems that either of the other 2 comment characters, *  --  * or  *  #  *  are
> also recognized by the parser within /*  ...  */.

"-- " means "comment to the end of the line". So,

SELECT "Hello" /* This is a comment -- This one, too */, "World";

Will _not_ output "HelloWorld", but rather "Hello". In the mysql
client program, you will also have to enter a semicolon on the next
line, because the semicolon at the end of the line is part of the
"-- " comment:

mysql> SELECT "Hello" /* This is a comment -- This one, too */, "World";
    -> ;
+-------+
| Hello |
+-------+
| Hello |
+-------+
1 row in set (0.00 sec)

This is a lengthy answer for saying "It's documented behaviour" :)

Regards,
--
  Stefan Hinz <[EMAIL PROTECTED]>
  iConnect GmbH <http://iConnect.de>
  Heesestr. 6, 12169 Berlin (Germany)
  Telefon: +49 30 7970948-0  Fax: +49 30 7970948-3

[filter fodder: sql, mysql, query]


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to