4
설정 :MySQL의 쿼리 문제
mysql> select main.id,body from main
-> left join test1 on main.id=test1.id
-> group by main.id;
반환 사용
mysql> create table main(id integer unsigned);
mysql> create table test1(id integer unsigned,body text);
Query OK, 0 rows affected (0.84 sec)
mysql> insert into main(id) value(1);
Query OK, 1 row affected (0.16 sec)
mysql> insert into test1(id,body) value(1,'something1');
Query OK, 1 row affected (0.27 sec)
mysql> insert into test1(id,body) value(1,'something2');
Query OK, 1 row affected (0.00 sec)
:
+------+------------+
| id | body |
+------+------------+
| 1 | something1 |
+------+------------+
1 row in set (0.02 sec)
공동으로 공간 TEST1에서 몸 연결을하는 방법에
를, "something1의 something2"를 얻을 수 있습니다 ?