语法错误 - 意外的MYSQL

时间:2013-10-29 05:00:49

标签: mysql where

在尝试将此SQLSERVER代码转移到MYSQL中时,真的不知道MYSQL

Select [SALARY],[BONUS],[COMM],
SUM (SALARY + BONUS + COMM)AS 
'Total Compensation'
FROM [Enterprise].[dbo].[Employee]
Where ED_LVL >= '16'
group by [SALARY],[BONUS],[COMM]

我显然将表名改为适合mysql

1 个答案:

答案 0 :(得分:3)

删除[]

SELECT SALARY,BONUS,COMM,
SUM (SALARY + BONUS + COMM) AS 'Total Compensation'
FROM databaseName.Employee
WHERE ED_LVL >= 16
GROUP BY SALARY,BONUS,COMM