Because the query planner needs to know the name(s) of the table(s) required 
for the query at "prepare time" and your query does not provide the name until 
"run time".

-----Urspr√ľngliche Nachricht-----
Von: sqlite-users [] Im 
Auftrag von Shane Dev
Gesendet: Sonntag, 05. November 2017 08:04
An: SQLite mailing list <>
Betreff: [EXTERNAL] [sqlite] Unexpected result from SELECT * FROM (subquery);


In sqlite3, I executed the following statements -

sqlite> select name from tabs where rowid=1;
sqlite> select * from tab1;
first rec

sqlite> select * from (select name from tabs where rowid=1);

I expected the last statement to evaluate the subquery first to be 'tab1'
and then execute SELECT * FROM tab1 to yield 'first rec'. Why didn't this 
sqlite-users mailing list

 Gunter Hick | Software Engineer | Scientific Games International GmbH | 
Klitschgasse 2-4, A-1130 Vienna | FN 157284 a, HG Wien, DVR: 0430013 | (O) +43 
1 80100 - 0

May be privileged. May be confidential. Please delete if not the addressee.
sqlite-users mailing list

Reply via email to