SQLite Forum

why do I get a row when querying a table with no rows?
Login
I'm trying to decide if this is a bug or a lack of understanding on my part.

This selects on t and joins t2, neither of which has any rows.  I would have thought the result would be zero rows.  ??

Any help would be appreciated.

> ~~~
sqlite> .nullvalue VIS_NULL
sqlite> .dump
PRAGMA foreign_keys=OFF;
BEGIN TRANSACTION;
CREATE TABLE t (foo);
CREATE TABLE t1 (bar);
COMMIT;
sqlite> select group_concat(quote(bar)) from t left join t1;
group_concat(quote(bar))
VIS_NULL
sqlite>
~~~