Joining two tables but getting no result


Move1       Move2  
Fire        Ice          
Grass       Fire   
Ice         Grass        


Move        Power
Fire        40   
Grass       30  
Ice         20  

I have these two tables, but when I run this SQL statement in WAMPServer, I get no rows returned:

FROM Table1, Table2
    INNER JOIN Table1 as Hello ON Hello.move1 = Table2.move
    INNER JOIN Table1 as Meow ON Meow.move2 = Table2.move

Both tables are under the same database, so I can’t see my error. I want it to return something like…


Move1       Move2     Move     Power     Move     Power
Fire        Ice       Fire     40        Ice      20  
Grass       Fire      Grass    30        Fire     40
Ice         Grass     Ice      20        Grass    30

Where did I go wrong?

Source: wampserver

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.