Author

Author- Ram Ranjeet Kumar

Monday, June 22, 2020

HAVING CLAUSE IN SQL

  • HAVING CLAUSE IS USED TO FILTER THE RECORDS.
  • HAVING CLAUSE EXECUTE GROUP BY GROUP.
  • HAVING CLAUSE EXECUTES AFTER THE EXECUTION OF GROUP BY CLAUSE.
  • WE CAN USE MULTI ROW FUNCTION IN HAVING CLAUSE.
  • WE CAN WRITE MULTIPLE CONDITION IN HAVING CLAUSE.


EXAMPLE:

WRITE A QUERY TO DISPLAY NUMBER OF EMPLOYEES WORKING IN EACH DEPARTMENT IN WHICH THEIR IS AT LEAST 2 EMPLOYEES ARE WORKING.










No comments:

Post a Comment