tsql
tsql copied to clipboard
Investigate SQLite bug where parenthesized subquery is treated as scalar
trafficstars
https://www.db-fiddle.com/f/9nFfo6iRzeD3kcvFJHFF5R/1
This query,
SELECT 1e0 IN(
(SELECT value FROM myTable)
);
Is not the same as this query,
SELECT 1e0 IN(
SELECT value FROM myTable
);
They're the same on MySQL and PostgreSQL, but not SQLite.
I can only assume SQLite thinks a parenthesized subquery is a scalar value, even if it fetches more than one row.