在尝试将此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
答案 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