If you're just starting your database journey or preparing for your first tech interview, mastering the basic SQL interview questions is a crucial step. SQL remains one of the most widely used languages for data querying and manipulation, and interviewers expect you to demonstrate a strong understanding of database fundamentals. This page offers a curated list of basic SQL questions for interview prep—perfect for beginners or anyone revisiting the fundamentals.
Many entry-level interviews start with basic DBMS interview questions that test your understanding of relational databases, normalization, keys, and indexing. You’ll then encounter foundational basic SQL interview questions covering:
These questions are essential for roles involving data analysis, backend development, or database administration.
While SQL is used for querying and managing data, PL/SQL (Procedural Language/SQL) adds procedural programming capabilities. Our deck also includes SQL PL/SQL interview questions, helping you bridge the gap between simple queries and more advanced database logic. Expect questions such as:
In addition, we cover some of the most popular SQL interview questions asked across tech companies—ensuring you’re prepared not just to answer questions, but to demonstrate your ability to think in SQL.
Whether you're reviewing basic SQL questions for interview prep or diving into SQL PL/SQL interview questions, this deck gives you a solid base to build on. Get started and turn your database knowledge into interview confidence.
Showing 50 of 50 flashcards
Difficulty: EASY
Type: Other
Yes. WHERE filters before grouping
Difficulty: EASY
Type: Other
INSERT INTO B SELECT ... FROM A;
Difficulty: EASY
Type: Other
SELECT name
Difficulty: EASY
Type: Other
SELECT * FROM Employees
Difficulty: EASY
Type: Other
Add an `ORDER BY Salary DESC` clause to the SELECT query.
Difficulty: EASY
Type: Other
Use IN with a subquery returning a list.
Difficulty: EASY
Type: Other
All rows in the table are updated.
Difficulty: EASY
Type: Other
It causes an error; use IN instead.
Difficulty: EASY
Type: Other
It combines rows from two or more tables using a related column.
Difficulty: EASY
Type: Other
Returns all rows from the left table and matched rows from the right.
Difficulty: EASY
Type: Other
A query nested inside another query.
Difficulty: EASY
Type: Other
Returns only the rows with matching keys in both tables.
Difficulty: EASY
Type: Other
Ascending (ASC) order is the default.
Difficulty: EASY
Type: Other
DELETE removes rows selectively; TRUNCATE removes all and is faster.
Difficulty: EASY
Type: Other
Functionally the same; IN is shorter.
Difficulty: EASY
Type: Other
`COUNT(*)` counts all rows
Difficulty: EASY
Type: Other
INNER JOIN gives only matched rows
Difficulty: EASY
Type: Other
To filter groups based on aggregated values.
Difficulty: EASY
Type: Other
WHERE filters rows before grouping
Difficulty: EASY
Type: Other
COUNT(*)
Difficulty: EASY
Type: Other
The `WHERE` clause.
Difficulty: EASY
Type: Other
AVG()
Difficulty: EASY
Type: Other
MAX()
Difficulty: EASY
Type: Other
MIN()
Difficulty: EASY
Type: Other
SUM()
Difficulty: EASY
Type: Other
IN
Difficulty: EASY
Type: Other
NOT IN
Difficulty: EASY
Type: Other
BETWEEN
Difficulty: EASY
Type: Other
LIKE
Difficulty: EASY
Type: Other
To group rows that have the same values in specified column(s).
Difficulty: EASY
Type: Other
DELETE FROM Orders WHERE status = 'Cancelled';
Difficulty: EASY
Type: Other
SELECT * FROM Persons WHERE age > 25 AND city = 'Mumbai';
Difficulty: EASY
Type: Other
even if no department exists.
Difficulty: EASY
Type: Other
SELECT e.name
Difficulty: EASY
Type: Other
SELECT department
Difficulty: EASY
Type: Other
SELECT DISTINCT city FROM Customers;
Difficulty: EASY
Type: Other
aged 22.
Difficulty: EASY
Type: Other
SELECT department
Difficulty: EASY
Type: Other
SELECT * FROM Employees WHERE age > 30;
Difficulty: EASY
Type: Other
UPDATE Customers SET age = 30 WHERE customer_id = 5;
Difficulty: EASY
Type: Other
SELECT COUNT(DISTINCT job_title) FROM Employees;
Difficulty: EASY
Type: Other
SELECT * FROM Employees WHERE join_date BETWEEN '2020-01-01' AND '2020-12-31';
Difficulty: EASY
Type: Other
SELECT name FROM Employees WHERE manager_id IS NULL;
Difficulty: EASY
Type: Other
SELECT * FROM Employees WHERE salary = (SELECT MAX(salary) FROM Employees);
Difficulty: EASY
Type: Other
SELECT department
Difficulty: EASY
Type: Other
SELECT name FROM Employees WHERE salary > (SELECT AVG(salary) FROM Employees);
Difficulty: EASY
Type: Other
SELECT MAX(salary) FROM Employees WHERE salary < (SELECT MAX(salary) FROM Employees);
Difficulty: EASY
Type: Other
SELECT salary FROM Employees ORDER BY salary DESC LIMIT 5;
Difficulty: EASY
Type: Other
SELECT c.name
Difficulty: EASY
Type: Other
UPDATE Employees SET salary = salary * 1.10;
We use cookies to improve your experience. By clicking “Accept” you consent to the use of cookies. Read our Privacy Policy.