Skip to content

Instantly share code, notes, and snippets.

@sycobuny
Created August 12, 2014 18:22
Show Gist options
  • Save sycobuny/d34151644dd63728880a to your computer and use it in GitHub Desktop.
Save sycobuny/d34151644dd63728880a to your computer and use it in GitHub Desktop.
Just my new style of query writing
SELECT
a.column1 AS a_col1,
a.column2 AS a_col2,
b.column1 AS b_col1,
b.column2 AS b_col2
FROM
asdf a INNER JOIN
qwerty b ON
a.id = b.qwerty_id
WHERE
a.sdf = 'asdf' AND
b.werty = 'qwerty';
SELECT a.column1 AS a_col1,
a.column2 AS a_col2,
b.column1 AS b_col1,
b.column2 AS b_col2
FROM asdf a INNER JOIN
qwerty b ON
a.id = b.qwerty_id
WHERE a.sdf = 'asdf' AND
b.werty = 'qwerty';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment