![](/img/trans.png)
[英]How to display multiple row values in musql table in a single html table row
[英]How to display multiple row values into single row
这里我的桌子是这样的
休假类型休假余额
CL 12
PL 10
现在我想显示我的数据如下
Leave_Type_CL Leave_Type_PL Leave_Balance_CL Leave_Balance_PL
CL PL 12 10
尝试这个:
SELECT CONCAT(
group_concat(CONVERT(Leave_Type, CHAR(2)) separator ' '),
' ',
group_concat(CONVERT(Leave_Balance, CHAR(2)) separator ' ')
) FROM Leave_Table;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.