根据,将deptuser_name字段进行切割获取最后一个索引的值
SELECT REVERSE(left(REVERSE(deptuser_name),LOCATE(',',REVERSE(deptuser_name))-1)) deptName ,count(deptuser_id) countSum from table group by deptuser_id
sql中截取某个字段获取特定的值
最新推荐文章于 2023-05-19 18:43:44 发布