1
Hyeongo 2017-05-23 14:59:28 +08:00 via iPhone
行转列
case when |
2
Hyeongo 2017-05-23 15:04:46 +08:00 via iPhone
看错了
|
3
saar 2017-05-23 15:06:02 +08:00
结果表,是乱写的话,感觉应该三张表,分别是用户、城市,为毛城市表里面还有省份?
seclcet User.username,User.user_sex,City.city from User,City where User.user_sex='男' and User.city_id=City.parent_id |
4
tttttttt OP ![]( https://ooo.0o0.ooo/2017/05/23/5923e0f06c900.png)
|
5
tttttttt OP !()[https://ooo.0o0.ooo/2017/05/23/5923e0f06c900.png]
|
6
tttttttt OP 回复不能用 markdown 吗? 前两个表是数据结构,最底下的一张表是要求返回的格式
|
8
Hyeongo 2017-05-23 15:21:47 +08:00
|
9
lissome 2017-05-23 15:28:38 +08:00
|
11
tttttttt OP @Hyeongo 谢谢回复,你的 select field 中 (t.CIty_Name+c.CIty_name) +号好像不行,最好用 concat
|
14
Wolfsin 2017-05-23 17:17:04 +08:00 via iPhone
|