join query

cpampas

Registered User.
Local time
Today, 00:09
Joined
Jul 23, 2012
Messages
221
hello,
I wonder if it is posible to build a join query with two tables, and repeat one of the tables . something like this :

Code:
SELECT tblA.name, tblA.score
FROM tblA

UNION SELECT tblB.name, tblB.score
FROM tblB

UNION SELECT tblB.name, tblB.score
FROM tblB;

so, I would join the data in tableB, twice. the query runs OK, but I can only retrieve once the data in tblB
Thanks
 
Try changing UNION to UNION ALL
 
It works great. Thanks a lot
 

Users who are viewing this thread

Back
Top Bottom