Search code examples
mysqlmysql-error-1064rollup

Syntax error in MySQL WITH ROLLUP query in MySQL Workbench?


Any idea why the following query syntax is wrong:

SELECT year, sum(profit)
FROM BASEDATA b 
group by year WITH rollup

Error Code: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near.....

MYSQL Version 5.0.77-community-log


Solution

  • It appears to be a bug in MySQL Workbench...the query runs fine under MySQL Query Browser.