使用mysql 要处理 带逗号的字符串,比如: “1,2,3,4,5”,变成一列一列
1
2
3
4
5
处理:
网上搜了下,查了下,没有直接可以用的方法,都是用help_topic表来处理的。使用help_topic时为了解决行转列的问题。
常见的是:
SELECT
SUBSTRING_INDEX(SUBSTRING_INDEX('7654,7698,7782,7788',',',help_topic_id+1),',',-1) AS num
FROM
my
问题来源:
今天在学习mybatis时,遇到的一个问题
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
The last packet sent successfully to the server