SQL - 继续收到错误关键字“AS”附近的语法不正确

时间:2015-10-03 02:52:26

标签: sql

继续收到错误关键字“AS”附近的语法不正确

下面是否有错误?

SELECT AVG(salary) AS [Average_Salary],   
CONCAT('$',FORMAT( MIN(salary),2) AS [Minimum_salary],  
concat('$',format ( MAX(salary),2) AS [Maximum_salary]
FROM  Salaries
WHERE (yearID = 1991);

1 个答案:

答案 0 :(得分:1)

您必须关闭concat括号:

SELECT AVG(salary) AS [Average_Salary],
CONCAT('$',FORMAT( MIN(salary),2)) AS [Minimum_salary],
concat('$',format ( MAX(salary),2)) AS [Maximum_salary]
FROM  Salaries
WHERE (yearID = 1991);