このページの翻訳:
- 日本語 (ja)
- English (en)
最近の更新
Tag Cloud
このページへのアクセス
今日: 9 / 昨日: 0
総計: 424
- Dokuwiki.fl8.jp(2321)
- 13 CentOS6メール設定(58)
- FreeBSD カーネル再構築(52)
- 75 Proftpd(51)
最近の更新
このページへのアクセス
今日: 9 / 昨日: 0
総計: 424
mysql> SELECT * FROM table1; +------+------+ | id | name | +------+------+ | 1 | A | | 2 | B | | 3 | C | | 4 | D | | 5 | E | | 6 | F | +------+------+ 6 rows in set (0.00 sec)
mysql> SELECT * FROM table2; +------+------+ | id | name | +------+------+ | 1 | A | | 2 | B | | 3 | C | | 7 | G | | 8 | H | | 9 | * | +------+------+ 6 rows in set (0.00 sec)
mysql> select * from table1 LEFT JOIN table2 ON table1.id=table2.id; +------+------+------+------+ | id | name | id | name | +------+------+------+------+ | 1 | A | 1 | A | | 2 | B | 2 | B | | 3 | C | 3 | C | | 4 | D | NULL | NULL | | 5 | E | NULL | NULL | | 6 | F | NULL | NULL | +------+------+------+------+ 6 rows in set (0.00 sec)
mysql> SELECT * FROM table1 INNER JOIN table2 ON table1.id=table2.id; +------+------+------+------+ | id | name | id | name | +------+------+------+------+ | 1 | A | 1 | A | | 2 | B | 2 | B | | 3 | C | 3 | C | +------+------+------+------+ 3 rows in set (0.00 sec)