Skip to content

Instantly share code, notes, and snippets.

@geekuillaume
Created August 3, 2018 12:28
Show Gist options
  • Save geekuillaume/629332d8e24124fd6467765cd1794805 to your computer and use it in GitHub Desktop.
Save geekuillaume/629332d8e24124fd6467765cd1794805 to your computer and use it in GitHub Desktop.
classic_join.sql
SELECT todo_lists.id AS todo_list_id,
todo_lists.name,
todo_items.id AS todo_item_id,
todo_items.name
FROM todo_ LISTS
LEFT JOIN todo_items ON todo_items.todo_list_id = todo_lists.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment