SQL All Keyword

All Keyword in SQL

Given the following database table: employee(emp_name, emp_salary) write an SQL statement to print the employee name with the highest salary

Solution

Using the max aggregate function will give us the maximum salary but it does not give us the name of the employee who has the maximum salary. The solution is to use the (ALL) keyword

Code

Here is the SQL statement

Tags:

Add a Comment

Your email address will not be published. Required fields are marked *