sql - SQLite multiple table INNER JOIN with USING (...) Errors -
i trying run query on sqlite database inner join
s 2 additional tables:
select usages.date date, usages.data data, stores.number store, items.name item usages inner join stores using (store_id) inner join items using (item_id)
however, error
sql error: cannot join using column item_id - column not present in both tables
i know can use explicit inner join stores on usages.store_id = stores.store_id
(and works), but: why using
query throw error in sqlite?
it doesn't on mysql...
i should note:
isn't problem me, using on
syntax, know why happening.
so have:
inner join items using (item_id)
...and error says:
sql error: cannot join using column item_id - column not present in both tables
that's got 1 of least cryptic error messages i've seen.
don't it's not clear me table being compared items.item_id
- stores
or usages
? why refrain using
or natural
join syntax...
Comments
Post a Comment