mysql> alter table city drop key idx_code; mysql> explain select * from city where countrycode='chn'; mysql> explain select * from city where countrycode in ('CHN','USA'); mysql> explain select * from city where countrycode='CHN' union all select * from city where countrycode='USA'...
有表字段为id,parent_id,name。想要根据name模糊查询出相关的层级 比如有以下树状数据: ---食物 --- 水果 --- 香蕉 --- 苹果 --- 肉类 --- 鸡肉 --- 肥牛 查询name like '%肉%'希望只出现以下结构 ---食物 --- 肉类 --- 鸡肉 javamysqlspringboot 有用关注4收藏 回复 阅读2.6k 3 个回答 得...