These are SQL questions of the kind HCLTech actually asks — the patterns that keep coming back in HCLTech's online tests and technical interview rounds for freshers. My advice: treat this page as a mock test. Attempt every question on paper first, then reveal. If any answer surprises you, the lesson it comes from is linked right below — go read it, then come back.
HCLTech SQL concept questions
What is the difference between a stored procedure and a function in SQL?
Asked in
HCLTech SQL query questions
Write a GRANT statement that gives the user analyst_ro SELECT-only privilege on the orders table, and a REVOKE statement that later removes that same privilege.
Asked in


orders2 rows
| order_id | customer_name | amount |
|---|---|---|
| 1 | Asha Rao | 100.00 |
| 2 | Ravi Kumar | 200.00 |
Write a query to fetch the top 5 highest-paid employees from the employees table.
Asked in
employees6 rows
| emp_id | name | salary |
|---|---|---|
| 1 | Asha | 90000 |
| 2 | Ravi | 85000 |
| 3 | Meera | 85000 |
| 4 | Kiran | 70000 |
| 5 | Zoya | 60000 |
| 6 | Dev | 55000 |
How to use this page: HCLTech rarely asks a question you've never seen — they ask standard patterns with a twist. Master the pattern in the SQL course lessons, and the twist stops mattering.
Keep practising: SQL Basics, Joins, GROUP BY & HAVING and Subqueries cover what most HCLTech SQL rounds test — and the HCLTech exam guide covers the rest of their selection process.

