Skip to content
Worked Examples · Example 8.7

Q.The following query displays details of all the employees who are working either in DeptId D01, D02 or D04.

CBSENCERTSubjective· 2mImportance★★★★★
29% · 13/45 Questions
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

Employees in department D01, D02, or D04.

SELECT * FROM EMPLOYEE
WHERE DeptId = 'D01' OR DeptId = 'D02' OR DeptId = 'D04';
-- equivalently: WHERE DeptId IN ('D01','D02','D04');

Output:

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.