Skip to content

Instantly share code, notes, and snippets.

@ara-ta3
Created March 19, 2015 02:33
Show Gist options
  • Save ara-ta3/d83ad28ef1ded059c573 to your computer and use it in GitHub Desktop.
Save ara-ta3/d83ad28ef1ded059c573 to your computer and use it in GitHub Desktop.
SQLアンチパターン18章
create table fuga(id int, name varchar(255));
create table piyo(id int, name varchar(255));
insert into fuga values(1, "fugafuga");
insert into piyo values(1, "fugafuga");
select * from fuga f inner join piyo p on f.id = p.id;
/*
+------+----------+------+----------+
| id | name | id | name |
+------+----------+------+----------+
| 1 | fugafuga | 1 | fugafuga |
+------+----------+------+----------+
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment