SQLite Forum

Documentation issue: SQL syntax error in https://sqlite.org/optoverview.html
Login

Documentation issue: SQL syntax error in https://sqlite.org/optoverview.html

(1) By Thomas Hess (luziferius) on 2020-12-17 19:13:08 [source]

Hello forum,

I found invalid SQL code in an example query in the SQLite documentation.

Link: https://sqlite.org/optoverview.html#the_omit_left_join_optimization

Point 17. The Omit LEFT JOIN Optimization contains example SQL code with syntax errors:

SELECT v1, v3 FROM t1 
  LEFT JOIN t3 USING (t1.ipk=t3.ipk)

In both example queries of that paragraph, the code uses USING, where it should be using ON.

I tried running this query and got this result:

sqlite> SELECT v1, v3 FROM t1 LEFT JOIN t3 USING (t1.ipk=t3.ipk);
Error: near ".": syntax error

Greetings,
Thomas