From http://dev.mysql.com/doc/refman/5.0/en/extensions-to-ansi.html:
MySQL Server understands the
||and&&operators to mean logical OR and AND, as in the C programming language. In MySQL Server,||andORare synonyms, as are&&andAND. Because of this nice syntax, MySQL Server doesn’t support the standard SQL||operator for string concatenation; useCONCAT()instead. BecauseCONCAT()takes any number of arguments, it’s easy to convert use of the||operator to MySQL Server.
Which brain-dead moron came up with this gem of a misfeature? What’s C got to do with anything? (And I like C). What they meant to say was “Because of this nice syntax, seasoned users of other systems will waste their time trawling through the docs to find out why on earth a most basic SQL standard doesn’t work as it should.” I shall limit myself to saying that this example epitomises the MySQL philosophy, and is frankly the kind of mindset more commonly associated with Redmond.




