Bird
0
0

Which of the following is the correct syntax to find the maximum salary from a table named Employees?

easy📝 Syntax Q12 of 15
SQL - Aggregate Functions
Which of the following is the correct syntax to find the maximum salary from a table named Employees?
ASELECT MAX salary FROM Employees;
BSELECT MAX{salary} FROM Employees;
CSELECT MAX[salary] FROM Employees;
DSELECT MAX(salary) FROM Employees;
Step-by-Step Solution
Solution:
  1. Step 1: Recall correct function syntax

    The correct syntax for SQL aggregate functions like MAX() requires parentheses around the column name.
  2. Step 2: Check syntax

    SELECT MAX(salary) FROM Employees; uses MAX(salary) which is correct. Forms without parentheses or using [] {} are invalid.
  3. Final Answer:

    SELECT MAX(salary) FROM Employees; -> Option D
  4. Quick Check:

    MAX() uses parentheses around column [OK]
Quick Trick: Use parentheses around column name in MAX() [OK]
Common Mistakes:
MISTAKES
  • Omitting parentheses in function calls
  • Using square or curly brackets instead of parentheses
  • Misspelling function names

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More SQL Quizzes