Consider the emp table having columns empno, ename Which of the following SQL query fetches empno that occur more than twice in the emp table.

  1. select count() from emp group by empno having count() >2;

  2. select empno, count() from emp having count() >2;

  3. select empno, count() from emp where count() >2;

  4. select empno, count() from emp group by empno having count() >2;


Correct Option: D

Find more quizzes: