时间:2021-07-01 10:21:17 帮助过:16人阅读
SELECT u.u_name, r.r_name, m.m_title FROM user u LEFT JOIN role r ON u.u_role_id = r.r_id JOIN mysql.help_topic h ON h.help_topic_id < (length(r.r_menu_id) - length(REPLACE(r.r_menu_id, ‘,‘, ‘‘)) + 1) LEFT JOIN menu m ON substring_index(substring_index(r.r_menu_id, ‘,‘, h.help_topic_id + 1), ‘,‘,- 1) = m.m_id ORDER BY u.u_id, r.r_id, m.m_id
MySql分隔符拆分查询(一行转多行)
标签:select style 用户表 dex drag OLE inf tar lte