You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
IN with a subquery of two columns uses the first column: x IN (SELECT x, y FROM t1) #2757
IN (SELECT a, b ...) with a subquery of more than one column uses the first column. SQLite refuses it (sub-select returns 2 columns - expected 1). Seen in the sqllogictest run (evidence/in1.test), reproduced on develop (06211a0):
alasql('CREATE TABLE t1 (x INTEGER, y STRING)');alasql("INSERT INTO t1 VALUES (1, 'true'), (0, 'false'), (NULL, 'NULL')");alasql('SELECT x FROM t1 WHERE x IN (SELECT x, y FROM t1)');// [{x: 1}, {x: 0}]alasql('SELECT 1 FROM t1 WHERE 1 IN (SELECT 1, 2)');// three rows
Breaking?
Yes, if it becomes an error: the result is consistent (the first column), so queries written this way work today.
Activity