Skip to content
Worked Examples · Example 8.15

Q.The following query displays details of all those employees whose name consists of exactly 5 letters and starts with any letter but has 'ANYA' after that.

West Bengal WbchseTextbookSubjective· 2mImportance★★★★★
53% · 24/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 whose 5-letter name matches the pattern '_ANYA' (any first letter, then ANYA).

SELECT * FROM EMPLOYEE WHERE Ename LIKE '_ANYA';

Output:

+-------+-------+--------+-------+--------+
| EmpNo | Ename | Salary | Bonus | DeptId |
+-------+-------+--------+-------+--------+
|   106 | Sanya |  48000 |   695 | D02    | …

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.