I have two tables; table1, table2, however table1 only has 1 record and table2 has 3 records im trying to join the tables so that it only shows one record from table 1 but all three from table2 without duplicating the values from table1
SELECT * from table1 a
inner join table2 b on
a.table1_id=b.table2_id
I have tried this but it still return a duplicate of the row in table1 and as I stated I tryin to get the 1 row from table1 joining with the three rows from tabl2 without showing the duplicates from table1
It doesn’t make sense to pull out one row from one table and three rows from another table on a
JOIN. What would such a result set even look like? The closest you can get is toGROUPbytable1.idandGROUP_CONCAT()thetable2values.E.g: