SELECT
REPLACE(GROUP_CONCAT(IF(ItemID=1101,ItemValue,"")),',',"") AS 'Item1101',
REPLACE(GROUP_CONCAT(IF(ItemID=1102,ItemValue,"")),',',"") AS 'Item1102',
REPLACE(GROUP_CONCAT(IF(ItemID=1103,ItemValue,"")),',',"") AS 'Item1103',
REPLACE(GROUP_CONCAT(IF(ItemID=1104,ItemValue,"")),',',"") AS 'Item1104',
REPLACE(GROUP_CONCAT(IF(ItemID=1105,ItemValue,"")),',',"") AS 'Item1105',
REPLACE(GROUP_CONCAT(IF(ItemID=1106,ItemValue,"")),',',"") AS 'Item1106',
REPLACE(GROUP_CONCAT(IF(ItemID=1107,ItemValue,"")),',',"") AS 'Item1107',
REPLACE(GROUP_CONCAT(IF(ItemID=1108,ItemValue,"")),',',"") AS 'Item1108'
FROM stroke_datainfo GROUP BY rid
相关文章
- MySQL导出数据文件
- MySQL if,ifnull,nullif 函数
- MySQL中的IFNULL,IF,NULLIF函数
- WNMP环境搭建步骤 nginx1.4.3+php-5.3.27+mysql-5.5+RunHiddenConsole
- Mysql5.7自定义函数递归报错1424 Recursive stored functions and triggers are not allowed
- 有关使用phpstudy搭建sqli-lab环境搭建时发生Uncaught Error: Call to undefined function mysql_connect()错误
- mysql if()
- mysql错误一例:ERROR 1030 (HY000): Got error 28 from storage engine
- MySQL搜索:WHERE
- mysql搜索不区分大小写