SELECT 'a' /* this is a comment */ 'b'What should the result be? (You can assume that
FROM onerow
onerow is an existing table that contains one row)It turns out popular RDBMS-es mostly disagree with one another.
In Oracle XE, we get this:
SELECT 'a' /* comment */ 'b'
*
ERROR at line 1:
ORA-00923: FROM keyword not found where expected
PostgreSQL 8.4 also treats it as a syntax error, and thus seems compatible with Oracle's behavior:
ERROR: syntax error at or near "'b'"[Read more...]
LINE 1: SELECT 'a' /* this is a