Multiple choice

Select a query to display the number of departments in employee table.

Consider the following relation schema:
 EMP(ENAME,EMPNO,SAL,COMM,DEPTNO,JOB,MGR,HIREDATE);

  1. select count(distinct DEPTNO) from EMP;

  2. select count(DEPTNO) from EMP;

  3. select number(distinct DEPTNO) from EMP;

  4. select count(distinct DEPTNO) from EMP

  5. none of these

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

It will fetch the correct data, as we use count and distinct both keywords.