Sqlite Select Data From Multiple Tables
I need to fetch data from multiple tables but cannot make a query for that. Any help in this regard will be appreciated. There are some questions already posted about how to fetch
Solution 1:
So you want something like this:
SELECT u.user_name,c.name,i.name,used.frequency
FROM users u
LEFT OUTER JOIN category c
ON(u.id = c.user_id)
LEFT OUTER JOIN item i
ON(i.category_id = c.id)
INNER JOIN Used
ON(i.id = used.item_id)
WHERE u.user_id = YOUR_USER_HERE
Post a Comment for "Sqlite Select Data From Multiple Tables"