Skip to content

Instantly share code, notes, and snippets.

@jrvaja
Created July 6, 2012 08:16
Show Gist options
  • Save jrvaja/3058892 to your computer and use it in GitHub Desktop.
Save jrvaja/3058892 to your computer and use it in GitHub Desktop.
SQL: JOIN
//Only returns columns from table1
SELECT table1 * from table1 INNER JOIN table2 on table1.id=table2.id;
//Returns all columns
SELECT * from table1 INNER JOIN table2 on table1.id=table2.id;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment