Question:medium

Given the following table:

ENOSALARY
A1014000
B109NULL
C5086000
A3052000

State the output of the following query:

SELECT COUNT(SALARY) FROM EMPLOYEE;  

Show Hint

\texttt{COUNT()} counts all rows including NULLs, while \texttt{COUNT(column)} ignores NULL values.
Updated On: Feb 16, 2026
  • 4
  • 2
  • 3
  • 1
Show Solution

The Correct Option is C

Solution and Explanation

Step 1: Understanding COUNT(column).
The SQL \texttt{COUNT(column)} function enumerates the non-null entries within a specified column.
Step 2: Identify non-NULL salaries.
From the provided dataset: Salaries are 4000, NULL, 6000, and 2000.
The count of valid, non-NULL entries is 3.
Step 3: Output.
\[\text{COUNT(SALARY)} = 3\]
Final Answer: \[\boxed{3}\]
Was this answer helpful?
0