Hector Finch
Hector Finch

Reputation: 15

Syntax error - Unexpected Where MYSQL

Don't really know MYSQL well just trying to transfer this SQLSERVER code to work in 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]

I obviously switched the tables name to fit mysql

Upvotes: 0

Views: 1510

Answers (1)

Hanky Panky
Hanky Panky

Reputation: 46900

Remove []

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

Upvotes: 3

Related Questions