You can do only where movies.id = 'tt0426459' or where user.id = 'tt0426459'
What to choose depends on your needs. And you're wrong that these variants are identical and movies.id is always equal to user.id because you're making left join. They will be identical if you will make inner join. But even in this case I don't understand why you consider bad or inconvenient explicitly mentioning table name. Pavel On Wed, Jul 1, 2009 at 12:24 PM, Yuzem<naujnit...@gmail.com> wrote: > > I have this: > select title,my_rating > from movies left join user on movies.id = user.id > where id = 'tt0426459' > The result: > ambiguous column name: id > > I could use: > select movies.id ids,title,my_rating > from movies left join user on movies.id = user.id > where ids = 'tt0426459' > > but I don't want to select the id > > Another solution: > where movies.id = 'tt0426459' > > Is there any way to specify that movies.id is equal to user.id so I can use > just id in my query? > Thanks in advance! > -- > View this message in context: > http://www.nabble.com/How-can-I-specify-that-a-column-is-equal-to-another--tp24292794p24292794.html > Sent from the SQLite mailing list archive at Nabble.com. > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users