MySQL Self Join Table
Can you help me understand JOIN a bit more


6 Replies
My expected output is the tables will literally join each other with same rows like
id recordDate Temp id recordDate Temp
1 2015-01-01 10 1 2015-01-01 10
2 2015-01-02 25 2 2015-01-02 25
etc
oh you need to use ON then link the same ID to output my expected output xD
but can you tell me why it does that output when there's no condition?
if you want that, you need to select the data twice
something like this:
if you notice, you didnt specify which column to join, so, it is going to join all the data of all the columns with all the data of the table in the join
Can you explain to me why it output this
when i run this query only?
SELECT *
FROM Weather AS yesterday
JOIN Weather AS today;

^ here
but i might be wrong about the "all columns", as it seems to be doing it just for the primary key
but i can't see the rest of the results, so
Thanks! @ἔρως
you're welcome