LogIn
I don't have account.

Practice sql Quizzes

Enhance your sql skills with carefully curated quizzes designed to improve concept clarity and real-world application. Each question reinforces key principles through active practice. Ideal for students and professionals, these quizzes help you learn faster, stay sharp and strengthen your overall technical expertise.

Explore All sql Quizzes

Learn sql step by step with interactive quizzes designed for beginners and learners revising key concepts. Build a strong foundation with clear, structured practice in sql.
Question 1
Which SQL statement is used to retrieve unique values from a column?
1
SELECT DISTINCT column_name FROM table_name;
2
SELECT DIFFERENT column_name FROM table_name;
3
SELECT column_name FROM table_name WHERE DISTINCT;
4
SELECT UNIQUE column_name FROM table_name;
Question 2
What does SQL stand for?
1
Structured Query Language
2
Standardized Query Logic
3
System Query Language
4
Sequential Query Language
Question 3
Which SQL command is used to remove all records from a table without deleting the table structure?
1
DROP
2
TRUNCATE
3
CLEAR
4
DELETE
Question 4
Which SQL join returns only the matching rows from both tables?
1
FULL JOIN
2
LEFT JOIN
3
INNER JOIN
4
RIGHT JOIN
Question 5
Which SQL constraint ensures that a column cannot have NULL values?
1
PRIMARY KEY
2
UNIQUE
3
CHECK
4
NOT NULL
Question 6
Which of the following is NOT an SQL aggregate function?
1
CONCAT()
2
SUM()
3
COUNT()
4
AVG()
Question 7
Which SQL clause is used to filter records from a table?
1
HAVING
2
ORDER BY
3
GROUP BY
4
WHERE
Question 8
Which SQL JOIN returns all records from the left table and only matching records from the right table?
1
FULL JOIN
2
INNER JOIN
3
LEFT JOIN
4
RIGHT JOIN
Question 9
Which constraint is used to ensure that all values in a column are unique?
1
NOT NULL
2
CHECK
3
UNIQUE
4
FOREIGN KEY
Question 10
Which SQL clause is used with aggregate functions to group results?
1
ORDER BY
2
GROUP BY
3
HAVING
4
DISTINCT
Question 11
Which database index type speeds up text searches in SQL?
1
Clustered Index
2
Hash Index
3
Full-Text Index
4
B-Tree Index
Question 12
Which SQL command is used to permanently save changes in a transaction?
1
DELETE
2
SAVEPOINT
3
COMMIT
4
ROLLBACK
Question 13
Which normal form removes partial dependency?
1
2NF
2
3NF
3
BCNF
4
1NF
Question 14
Which SQL command creates a virtual table?
1
CREATE TABLE
2
CREATE INDEX
3
CREATE PROCEDURE
4
CREATE VIEW
Question 15
Which keyword is used to define an output parameter in an SQL stored procedure?
1
RETURN
2
OUT
3
RESULT
4
OUTPUT
Question 16
Which of the following SQL commands is used to remove all records from a table but keep its structure?
1
DROP
2
TRUNCATE
3
DELETE
4
ALTER
Question 17
Which SQL clause is evaluated after the GROUP BY clause?
1
HAVING
2
ORDER BY
3
WHERE
4
DISTINCT
Question 18
What will happen if you use DELETE without a WHERE clause?
1
Only one row will be deleted
2
All rows will be deleted
3
SQL error will occur
4
Table structure will be deleted
Question 19
Which SQL keyword is used to sort the result set?
1
FILTER
2
ORDER BY
3
GROUP BY
4
SORT
Question 20
Which SQL function returns the total number of rows, including NULL values?
1
COUNT(*)
2
TOTAL()
3
COUNT(column_name)
4
SUM()
Question 21
Which SQL statement is used to add a new column to an existing table?
1
ALTER TABLE
2
UPDATE TABLE
3
ADD COLUMN
4
MODIFY TABLE
Question 22
Which SQL operator is used to search for a specified pattern?
1
LIKE
2
IN
3
BETWEEN
4
EXISTS
Question 23
What is the purpose of the EXISTS keyword in SQL?
1
Checks if a subquery returns any rows
2
Verifies column existence
3
Checks if a table exists
4
Checks for NULL values
Question 24
Which isolation level allows dirty reads?
1
REPEATABLE READ
2
READ COMMITTED
3
SERIALIZABLE
4
READ UNCOMMITTED
Question 25
Which SQL statement is used to rename a table?
1
CHANGE TABLE
2
MODIFY TABLE
3
ALTER NAME
4
RENAME TABLE
Question 26
Which index improves performance when queries frequently use range conditions?
1
B-Tree Index
2
Full-Text Index
3
Bitmap Index
4
Hash Index
Question 27
What is the main advantage of using window functions in SQL?
1
They replace subqueries completely
2
They improve indexing performance
3
They allow aggregation without grouping rows
4
They modify the original table data
Question 28
Which scenario is most suitable for using a CTE (Common Table Expression)?
1
When permanent storage is required
2
When improving table indexing
3
When simplifying complex recursive or multi-step queries
4
When replacing transactions
Question 29
Which SQL join can be used to find records that exist in one table but not in another?
1
LEFT JOIN with NULL check
2
CROSS JOIN
3
INNER JOIN
4
FULL JOIN
Question 30
Which index type is most effective for columns with low cardinality?
1
Full-Text Index
2
B-Tree Index
3
Hash Index
4
Bitmap Index