I have 2 tables post
and comments
and I want to select 10 posts joined with all comments:
SELECT * from post p left join comments c on p.id = c.post LIMIT 10;
this query will not work since the limit is for post with comments and not for the posts alone. How can I do this then? Is it possible without using inner query?
Try this