1. mysql 从集合列中,拎出所要查询的字段
SELECT CURDATE(), REPLACE(parent_ids,',','|') as 'replaceDisplay', FIND_IN_SET('3', REPLACE(parent_ids,'|',',')) FROM sys_menu
WHERE FIND_IN_SET(3, REPLACE(parent_ids,'|',','))
2. mysql 分析及解释
EXPLAIN SELECT CURDATE(), REPLACE(parent_ids,',','|') as 'replaceDisplay', FIND_IN_SET('3', REPLACE(parent_ids,'|',','))
FROM sys_menu
WHERE FIND_IN_SET(3, REPLACE(parent_ids,'|',','))
ORDER BY RAND();
SELECT CURDATE(), REPLACE(parent_ids,',','|') as 'replaceDisplay', FIND_IN_SET('3', REPLACE(parent_ids,'|',','))
FROM sys_menu
WHERE FIND_IN_SET(3, REPLACE(parent_ids,'|',','))
ORDER BY RAND() procedure analyse();
3. mysql 引擎
show ENGINES;
4.