Skip to content

Instantly share code, notes, and snippets.

@betweenbrain
Created August 14, 2014 21:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betweenbrain/dc82dcacf8ca4f038948 to your computer and use it in GitHub Desktop.
Save betweenbrain/dc82dcacf8ca4f038948 to your computer and use it in GitHub Desktop.
Simple MySQL Join
SELECT
table1.id,
table1.firstName,
table1.lastName,
table2.sales,
table2.date
FROM `table1`
LEFT JOIN `table2` ON table1.firstName = table2.firstName;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment