Skip to content

Instantly share code, notes, and snippets.

@nunenuh
Created April 17, 2015 08:47
Show Gist options
  • Save nunenuh/3c3841d4a6b1fe052b4c to your computer and use it in GitHub Desktop.
Save nunenuh/3c3841d4a6b1fe052b4c to your computer and use it in GitHub Desktop.
Join Many to Many
SELECT
*
FROM book b
INNER JOIN book_has_category bhc
ON b.id = bhc.book_id
INNER JOIN category c
ON bhc.category_id = c.id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment