在Msql里面sql语句可以正常执行,但是在GBase里面就报错,求大神帮忙看看啊!!!
这是报错信息:
java.sql.SQLException: The column (menu_name) must be in the GROUP BY list
下面是sql语句:
select
t.id, t.menu_name, t.menu_url, t.menu_icon, t.parent_id, t.sort ,
count(m.id)
as child_num
from sys_menu t
left join sys_menu m
on m.parent_id = t.id
where t.parent_id = 11
group by t.id
order by t.sort