mysql:4271
From: (遠藤 俊裕) <<endo_t@xxxxxxxxxx>>
Date: Mon, 03 Sep 2001 16:54:03 +0900
Subject: [mysql 04271] Re: 2テーブル間で不一致のデータを抽出したい!
遠藤です。 yasushi fujiwara さんは書きました: >はじめまして、「やすし」と申します。 % mysql test Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 10 to server version: 3.23.41-log Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql> create table a ( cd char(10) ); Query OK, 0 rows affected (0.11 sec) mysql> create table e ( cd char(10), name char(20)); Query OK, 0 rows affected (0.09 sec) mysql> insert into a values ('1'); Query OK, 1 row affected (0.00 sec) mysql> insert into e values ('1', '長島 茂雄'); Query OK, 1 row affected (0.00 sec) mysql> insert into e values ('2', '鈴木 一郎'); Query OK, 1 row affected (0.00 sec) mysql> select * from a; +------+ | cd | +------+ | 1 | +------+ 1 row in set (0.00 sec) mysql> select * from e; +------+-----------+ | cd | name | +------+-----------+ | 1 | 長島 茂雄 | | 2 | 鈴木 一郎 | +------+-----------+ 2 rows in set (0.00 sec) mysql> select distinct e.cd, e.name from e, a where e.cd <> a.cd; +------+-----------+ | cd | name | +------+-----------+ | 2 | 鈴木 一郎 | +------+-----------+ 1 row in set (0.01 sec)
4270 2001-09-03 16:18 ["yasushi fujiwara" <] 2テーブル間で不一致のデータを抽出したい! -> 4271 2001-09-03 16:54 ┣[<endo_t@xxxxxxxxxx> ] 4272 2001-09-03 17:52 ┣[madara <madara@xxxxx] 4273 2001-09-03 19:39 ┃┗["yasushi fujiwara" <] 4274 2001-09-03 19:54 ┃ ┣[fuji <fujiyama@xxxxx] 4277 2001-09-03 21:49 ┃ ┗[<endo_t@xxxxxxxxxx> ] 4278 2001-09-03 23:02 ┃ ┗["yasushi fujiwara" <] 4289 2001-09-09 08:15 ┃ ┗[<moeru@xxxxxxxxxx> ] 4290 2001-09-10 13:08 ┃ ┣[fuji <fujiyama@xxxxx] 4292 2001-09-10 21:23 ┃ ┃┗[<moeru@xxxxxxxxxx> ] 4293 2001-09-10 22:07 ┃ ┃ ┣[<endo_t@xxxxxxxxxx> ] 4294 2001-09-10 22:19 ┃ ┃ ┣[とみたまさひろ <tomm] 4295 2001-09-10 22:41 ┃ ┃ ┗[fuji <fujiyama@xxxxx] 4298 2001-09-12 00:23 ┃ ┃ ┗[<moeru@xxxxxxxxxx> ] 4291 2001-09-10 13:31 ┃ ┗[madara <madara@xxxxx] 4275 2001-09-03 19:54 ┗[Tomohiro 'Tomo-p' KA]