I am new in sql i am trying to learn sql.
i want to execute a query for nth highest salary when i write query i throw me a error.
i am writing this subquery
SELECT TOP 3 salary FROM salary ORDER BY SALARY DESC;
ERROR 1064 (42000): 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 '3 salary FROM salary ORDER BY SALARY DESC' at line 1
Equivalent query in
TOP is used in
SQL Server / MS Access.
SELECT salary FROM salary ORDER BY SALARY DESC LIMIT 3;