juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
Part A: 20 Most Important SQL MCQs
1. Which SQL keyword is used to retrieve only unique values?
A. SELECT
B. DISTINCT
C. UNIQUE
D. ONLY
Correct Answer: B. DISTINCT
Explanation: DISTINCT ensures that the result set contains only unique (non-duplicate) values.
2. Which function is used to count the number of rows in SQL?
A. SUM()
B. COUNT()
C. TOTAL()
D. NUMBER()
Correct Answer: B. COUNT()
Explanation: COUNT() returns the number of rows that match a specified criterion.
3. Which SQL clause is used to filter records?
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
A. SELECT
B. ORDER BY
C. WHERE
D. GROUP BY
Correct Answer: C. WHERE
Explanation: The WHERE clause is used to filter records that meet a certain condition.
4. What will the query SELECT AVG(Salary) FROM EMPLOYEES do?
A. Returns total salary
B. Returns average salary
C. Returns number of employees
D. Returns highest salary
Correct Answer: B. Returns average salary
Explanation: AVG() function calculates the average of the values in a numeric column.
5. Which operator is used for pattern matching in SQL?
A. LIKE
B. IN
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
C. BETWEEN
D. IS
Correct Answer: A. LIKE
Explanation: LIKE is used with wildcards to search for a specified pattern in a column.
6. What does the SQL statement DELETE FROM STUDENT do?
A. Deletes table
B. Deletes a record
C. Deletes all records
D. Syntax error
Correct Answer: C. Deletes all records
Explanation: Without a WHERE clause, DELETE removes all records from the table.
7. Which SQL function returns the number of records?
A. TOTAL()
B. SUM()
C. COUNT()
D. NUMBER()
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
Correct Answer: C. COUNT()
Explanation: COUNT() returns the number of records in a table.
8. Which keyword is used to sort the result set?
A. ORDER BY
B. GROUP BY
C. SORT
D. ARRANGE BY
Correct Answer: A. ORDER BY
Explanation: ORDER BY is used to sort the result set by one or more columns.
9. Which SQL clause groups rows that have the same values?
A. WHERE
B. ORDER BY
C. GROUP BY
D. HAVING
Correct Answer: C. GROUP BY
Explanation: GROUP BY is used with aggregate functions to group result-set by one or more columns.
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
10. What is the use of the HAVING clause in SQL?
A. Filter rows
B. Sort data
C. Filter grouped data
D. Rename columns
Correct Answer: C. Filter grouped data
Explanation: HAVING is used to filter records after GROUP BY has been applied.
11. What does SELECT * FROM EMPLOYEE mean?
A. Select all columns
B. Select specific columns
C. Syntax error
D. None
Correct Answer: A. Select all columns
Explanation: The asterisk (*) selects all columns from the table.
12. What does the BETWEEN operator do?
A. Finds patterns
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
B. Filters a range
C. Sorts data
D. Finds NULLs
Correct Answer: B. Filters a range
Explanation: BETWEEN filters the result set within a specified range.
13. Which of the following is a valid SQL statement to change a value?
A. ALTER VALUE
B. CHANGE
C. UPDATE
D. MODIFY
Correct Answer: C. UPDATE
Explanation: UPDATE is used to modify the existing records in a table.
14. What does the SQL IN operator do?
A. Checks for NULL
B. Compares multiple values
C. Sorts rows
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
D. Joins tables
Correct Answer: B. Compares multiple values
Explanation: IN allows specifying multiple values in a WHERE clause.
15. Which SQL clause is used to rename a column in the result set?
A. RENAME
B. AS
C. ALIAS
D. SET
Correct Answer: B. AS
Explanation: AS is used to rename a column or table with an alias.
16. Which of the following SQL functions return the largest value?
A. MAX()
B. TOP()
C. HIGHEST()
D. BIGGEST()
Correct Answer: A. MAX()
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
Explanation: MAX() returns the maximum value in a set.
17. What does the SQL LIKE '_a%' pattern match?
A. Words starting with 'a'
B. Words ending with 'a'
C. Words with 'a' at second position
D. All words
Correct Answer: C. Words with 'a' at second position
Explanation: _ matches any single character, so '_a%' matches any word with 'a' in second place.
18. What is the default sorting order in SQL?
A. ASC
B. DESC
C. RANDOM
D. NONE
Correct Answer: A. ASC
Explanation: ASC (ascending) is the default sorting order.
19. Which clause is used with aggregate functions in SQL?
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
A. HAVING
B. WHERE
C. ORDER BY
D. SELECT
Correct Answer: A. HAVING
Explanation: HAVING is used to filter data based on aggregate functions.
20. What will SELECT COUNT(*) FROM STUDENTS; return?
A. Sum of values
B. Count of all rows
C. Count of NULLs
D. Count of distinct names
Correct Answer: B. Count of all rows
Explanation: COUNT(*) counts all rows in the table including duplicates and NULLs.
Part B: 5 Most Important SQL PYQs
1. Write an SQL query to display the names of all students from the 'STUDENT' table who scored more than
90 marks.
juzoii - 20 Most Important MCQs & PYQs (CBSE Class 12 - 2025)
Answer: SELECT Name FROM STUDENT WHERE Marks > 90;
Explanation: This query filters records where Marks is greater than 90 and selects the Name field.
2. Write an SQL query to update the city of all customers from 'Delhi' to 'New Delhi' in the 'CUSTOMER' table.
Answer: UPDATE CUSTOMER SET City = 'New Delhi' WHERE City = 'Delhi';
Explanation: The UPDATE statement modifies all records where City is 'Delhi'.
3. Write a query to find all employees whose name starts with 'A' in the EMP table.
Answer: SELECT * FROM EMP WHERE Name LIKE 'A%';
Explanation: LIKE 'A%' matches names that start with 'A'.
4. Write a query to find the average salary of employees from the EMPLOYEE table.
Answer: SELECT AVG(Salary) FROM EMPLOYEE;
Explanation: AVG is used to calculate the average value of the Salary column.
5. Write a query to display department-wise total salary using GROUP BY.
Answer: SELECT Department, SUM(Salary) FROM EMPLOYEE GROUP BY Department;
Explanation: GROUP BY groups rows by Department, and SUM calculates total salary per department.