I'm learning mysql and have been trying to get this working, but an error always comes up no matter how I try it - or it just doesn't show anything from the table.
I have 3 tables, all with the same amount of columns and name of columns
I want to list all the values in alphabetical order by title
Tables: General - Temp - Location
Columns: id - url - title - description
How would you write the select statement?
I have tried numerous ways and can't figure it out... I'm guessing it would look something like
SELECT * FROM General JOIN Temp ON General.title = Temp.title JOIN Location ON Temp.title = General.title
I have played around extensively with changing the values like Temp.title = General.title and that doesnt seem to help
Any ideas?
Thanks!
p.s - I also tried this and it gives data, but only shows a few results from the general table with the amount of posts from temp.. very confusing
SELECT
General.id,
General.url,
General.title,
General.description,
Temp.id,
Temp.url,
Temp.title,
Temp.description,
Location.id,
Location.url,
Location.title,
Location.description
FROM
General INNER JOIN Temp
ON General.id = Temp.id
INNER JOIN Location
ON Temp.id = Location.id
ORDER BY
General.title