Jay Sprenkle <[EMAIL PROTECTED]> wrote:
> I'm not sure if this counts as a bug or not.
>
> SQLite version 3.5.2
> Enter ".help" for instructions
> sqlite> select * from (select user.id from user ) ;
> 0
> 1
> 2
> 3
> 4
> sqlite> select * from (select user.id from user ) where id=1 ;
> SQL error: no such column: id
> sqlite> select * from (select user.id from user ) where user.id=1 ;
> SQL error: no such column: user.id

select * from (select user.id from user ) where "user.id"=1

The resulting column is literally named "user.id", period and all.

> Should the result of a subselect have a table name?

If you assign one to it. For example,

select * from (select user.id f from user ) t where t.f=1

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to