Database Engine MariaDB (and presumably MySQL).
To Reproduce
import pkg from 'node-sql-parser';
const { Parser } = pkg;
const parser = new Parser();
parser.parse("SELECT * FROM A JOIN (B JOIN C USING (x)) USING (y)");
- node-sql-parser: 5.3.9
- node: v18.12.0
Expected behavior
Should not fail to parse.
Additional context
- Some of my students think this is valid SQL, and MySQL agrees.
- Same issue with
ON: SELECT * FROM A JOIN (B JOIN C ON B.x = C.x) ON A.y = C.y.
- Obviously works with:
SELECT * FROM B JOIN C USING (x) JOIN A USING (y).
Database Engine MariaDB (and presumably MySQL).
To Reproduce
Expected behavior
Should not fail to parse.
Additional context
ON:SELECT * FROM A JOIN (B JOIN C ON B.x = C.x) ON A.y = C.y.SELECT * FROM B JOIN C USING (x) JOIN A USING (y).