select m.uid,w.webName from member_jd m left join website w on m.uid=w.uid order by m.uid
表m
uid
1
2
表w
wid uid webName
1 2 a
2 2 b想要结果
uid webName
1 null
2 a,b
select
表m
uid
1
2
表w
wid uid webName
1 2 a
2 2 b想要结果
uid webName
1 null
2 a,b
select
解决方案 »
- com.mysql.jdbc.CommunicationsException: Communications link failure
- mysql工具使用(mysqlbinlog等)
- sql查询语句——请教各位大牛 (弄了一天了,我是无力了)
- 请教一个表中产品销售记录的查询。
- 100分求建议,标题一定要长
- 如何修改MySQL的默认ID号排序?
- 请教部分范围的排行的sql语句该怎么写?
- 满足这个功能的SQL语句如何写???
- 关于SQL语句的写法
- Last_Errno: 1062,Last_Error: Error 'Duplicate entry '...' for key 'PRIMARY'' on
- MySql 存储过程使用游标循环插入数据问题
- mySQL触发器
from m left join w on m.uid=w.uid
group by w.uid
+------+---------+
| uid | webname |
+------+---------+
| 1 | NULL |
| 2 | a,b |
+------+---------+
2 rows in set (0.00 sec)