Friday, January 16, 2026

100 SQL MCQ with Solutions (SQL Check 2026)


This SQL Check 2026 incorporates 100 SQL MCQ with Solutions that can assist you follow and enhance your SQL data. These SQL MCQ questions cowl crucial SQL subjects, together with fundamentals, joins, queries, features, constraints, keys, and so on. This SQL Check is right for college students, freshers, builders, and anybody getting ready for placements, coding interviews, on-line exams, or aggressive exams.

SQL MCQ with Solutions (Dropdown Format)

Beneath are 100 SQL MCQ with solutions. Click on on the dropdown button beside every query to disclose the right reply and clarification.

Q1. Which SQL assertion is used to retrieve knowledge from a database?

A. INSERT
B. DELETE
C. SELECT
D. UPDATE

Present Reply

Reply: C
SELECT is used to retrieve knowledge from a database desk.

Q2. Which SQL clause is used to filter the information?

A. WHERE
B. HAVING
C. FILTER
D. ORDER BY

Present Reply

Reply: A
WHERE is used to filter information primarily based on circumstances.

Q3. Which of the next is used to type the result-set in SQL?

A. SORT BY
B. ORDER BY
C. GROUP BY
D. ARRANGE BY

Present Reply

Reply: B
ORDER BY types the consequence set in ascending/descending order.

This fall. What does SQL stand for?

A. Structured Question Language
B. Easy Question Language
C. Sequential Question Language
D. Commonplace Question Language

Present Reply

Reply: A
SQL stands for Structured Question Language.

Q5. Which SQL command is used to take away a desk and all its knowledge?

A. DROP TABLE
B. DELETE TABLE
C. REMOVE TABLE
D. CLEAR TABLE

Present Reply

Reply: A
DROP TABLE deletes the desk construction and its knowledge.

Q6. Which SQL operate is used to rely the variety of rows?

A. COUNT()
B. SUM()
C. TOTAL()
D. NUMBER()

Present Reply

Reply: A
COUNT() returns the variety of rows matching standards.

Q7. What does the SQL GROUP BY clause do?

A. Kinds information
B. Filters information
C. Teams rows which have the identical values
D. Deletes duplicate rows

Present Reply

Reply: C
GROUP BY teams rows sharing widespread values.

Q8. Which SQL assertion is used to insert new knowledge right into a desk?

A. INSERT INTO
B. UPDATE
C. ADD
D. PUT

Present Reply

Reply: A
INSERT INTO provides new rows to a desk.

Q9. Which SQL key phrase is used to take away duplicate information from the consequence set?

A. UNIQUE
B. DISTINCT
C. DIFFERENT
D. ONLY

Present Reply

Reply: B
DISTINCT removes duplicate values from outcomes.

Q10. What’s the default type order in SQL ORDER BY?

A. DESC
B. ASC
C. NONE
D. RANDOM

Present Reply

Reply: B
ASC (ascending) is the default ORDER BY type order.

Q11. Which SQL clause is used with combination features to filter teams?

A. WHERE
B. HAVING
C. GROUP
D. FILTER

Present Reply

Reply: B
HAVING filters teams after aggregation.

Q12. Which SQL assertion updates current knowledge in a desk?

A. MODIFY
B. ALTER
C. UPDATE
D. CHANGE

Present Reply

Reply: C
UPDATE modifies current information in a desk.

Q13. What sort of JOIN returns all information when there’s a match in both desk?

A. INNER JOIN
B. LEFT JOIN
C. RIGHT JOIN
D. FULL OUTER JOIN

Present Reply

Reply: D
FULL OUTER JOIN returns all information with matches or not.

Q14. Which SQL constraint ensures distinctive values?

A. PRIMARY KEY
B. FOREIGN KEY
C. UNIQUE
D. CHECK

Present Reply

Reply: C
UNIQUE ensures no duplicates in a column.

Q15. What’s the objective of an index in SQL?

A. To hurry up queries
B. To type knowledge
C. To backup database
D. To compress knowledge

Present Reply

Reply: A
Indexes enhance question efficiency.

Q16. Which SQL operate returns the utmost worth of a column?

A. MAX()
B. TOP()
C. BIG()
D. HIGH()

Present Reply

Reply: A
MAX() returns the very best worth from a column.

Q17. Which SQL key phrase is used to pick out solely distinctive information?

A. UNIQUE
B. DISTINCT
C. ONLY
D. DIFFERENT

Present Reply

Reply: B
DISTINCT ensures distinctive outcomes.

Q18. What’s the results of `SELECT COUNT(*) FROM desk;`?

A. Variety of columns
B. Variety of rows
C. Sum of values
D. Common of values

Present Reply

Reply: B
COUNT(*) returns the full variety of rows.

Q19. Which SQL command removes all rows from a desk with out logging particular person row deletions?

A. DELETE
B. DROP
C. TRUNCATE
D. REMOVE

Present Reply

Reply: C
TRUNCATE removes all rows effectively.

Q20. Which SQL clause is used to mix rows from two or extra tables primarily based on a associated column?

A. UNION
B. MERGE
C. JOIN
D. CONNECT

Present Reply

Reply: C
JOIN combines desk rows utilizing associated columns.

Q21. What sort of JOIN returns solely matching rows from each tables?

A. FULL JOIN
B. LEFT JOIN
C. RIGHT JOIN
D. INNER JOIN

Present Reply

Reply: D
INNER JOIN returns solely matching rows.

Q22. In SQL, which assertion modifications the construction of a desk?

A. MODIFY TABLE
B. CHANGE TABLE
C. ALTER TABLE
D. UPDATE TABLE

Present Reply

Reply: C
ALTER TABLE modifies desk construction.

Q23. Which SQL constraint enforces entity integrity?

A. CHECK
B. FOREIGN KEY
C. PRIMARY KEY
D. UNIQUE

Present Reply

Reply: C
PRIMARY KEY ensures every row is exclusive.

Q24. What does SQL LIKE operator do?

A. Compares patterns
B. Kinds values
C. Joins tables
D. Deletes rows

Present Reply

Reply: A
LIKE matches patterns utilizing wildcards.

Q25. Which wildcard matches any variety of characters in SQL?

A. _
B. %
C. *
D. +

Present Reply

Reply: B
% matches zero or extra characters.

Q26. Which SQL assertion creates a brand new desk?

A. NEW TABLE
B. CREATE TABLE
C. MAKE TABLE
D. ADD TABLE

Present Reply

Reply: B
CREATE TABLE makes a brand new desk.

Q27. Which SQL key phrase is used to delete duplicate rows from the consequence?

A. ONLY
B. DISTINCT
C. UNIQUE
D. DIFFERENT

Present Reply

Reply: B
DISTINCT removes duplicate rows.

Q28. Which SQL assertion is used so as to add a brand new column to an current desk?

A. ADD COLUMN
B. INSERT COLUMN
C. ALTER TABLE
D. MODIFY TABLE

Present Reply

Reply: C
ALTER TABLE provides columns.

Q29. Which SQL operate returns the common worth of a numeric column?

A. AVG()
B. SUM()
C. AVERAGE()
D. MEAN()

Present Reply

Reply: A
AVG() calculates common of values.

Q30. Which SQL clause is used after GROUP BY to filter group outcomes?

A. WHERE
B. HAVING
C. FILTER
D. ORDER

Present Reply

Reply: B
HAVING applies circumstances on grouped rows.

Q31. Which SQL operator checks if a worth exists in a set?

A. IN
B. EXISTS
C. ANY
D. ALL

Present Reply

Reply: A
IN checks set membership.

Q32. What does SQL UNION operator do?

A. Combines outcomes from a number of SELECTs
B. Deletes duplicates
C. Joins tables
D. Filters knowledge

Present Reply

Reply: A
UNION merges consequence units from SELECTs.

Q33. Which SQL operate calculates the full sum of a column?

A. COUNT()
B. TOTAL()
C. SUM()
D. ADD()

Present Reply

Reply: C
SUM() returns the full of values.

Q34. Which SQL assertion is used to create an index?

A. CREATE INDEX
B. ADD INDEX
C. MAKE INDEX
D. NEW INDEX

Present Reply

Reply: A
CREATE INDEX defines an index.

Q35. Which SQL clause is used to specify the kind order?

A. WHERE
B. HAVING
C. GROUP BY
D. ORDER BY

Present Reply

Reply: D
ORDER BY arranges outcomes.

Q36. Which SQL constraint ensures values are inside a selected vary?

A. UNIQUE
B. CHECK
C. DEFAULT
D. NOT NULL

Present Reply

Reply: B
CHECK enforces vary circumstances.

Q37. Which SQL assertion is used to rename a desk?

A. RENAME TABLE
B. ALTER TABLE … RENAME TO
C. MODIFY TABLE
D. CHANGE NAME

Present Reply

Reply: B
ALTER TABLE … RENAME TO renames a desk.

Q38. Which SQL key phrase is used to stop null values?

A. NULL
B. NO NULL
C. NOT NULL
D. REQUIRED

Present Reply

Reply: C
NOT NULL stops null entries.

Q39. Which SQL combination operate returns the smallest worth?

A. MIN()
B. LOW()
C. SMALL()
D. FIRST()

Present Reply

Reply: A
MIN() provides the minimal worth.

Q40. Which SQL clause is used to mix consequence units and take away duplicates?

A. UNION
B. JOIN
C. MERGE
D. COMBINE

Present Reply

Reply: A
UNION merges outcomes and removes duplicates.

Q41. In SQL, which operator is used to mix the consequence units of two SELECT statements with out duplicates?

A. JOIN
B. UNION
C. INTERSECT
D. EXCEPT

Present Reply

Reply: B
UNION combines SELECT outcomes and removes duplicate rows.

Q42. Which SQL clause is used to examine if a worth exists in a subquery consequence?

A. IN
B. EXISTS
C. LIKE
D. BETWEEN

Present Reply

Reply: B
EXISTS exams for the existence of rows in a subquery.

Q43. Which SQL key phrase renames a column or desk?

A. RENAME
B. AS
C. CHANGE
D. MODIFY

Present Reply

Reply: B
AS assigns an alias to a column or desk in outcomes.

Q44. In SQL, what does the BETWEEN operator do?

A. Selects values inside a variety
B. Checks for NULLs
C. Joins two tables
D. Deletes a variety of information

Present Reply

Reply: A
BETWEEN selects values inside a specified vary.

Q45. Which SQL command is used to create a brand new database desk?

A. ADD TABLE
B. CREATE TABLE
C. NEW TABLE
D. MAKE TABLE

Present Reply

Reply: B
CREATE TABLE defines a brand new desk.

Q46. What’s a view in SQL?

A. A bodily desk
B. A digital desk primarily based on a question
C. A backup of a desk
D. A short lived column

Present Reply

Reply: B
A view is a digital desk outlined by a SELECT question.

Q47. Which constraint checks that values meet a selected situation?

A. UNIQUE
B. PRIMARY KEY
C. CHECK
D. FOREIGN KEY

Present Reply

Reply: C
CHECK ensures values fulfill a situation.

Q48. Which operator is used to seek for a sample in SQL?

A. IN
B. LIKE
C. BETWEEN
D. MATCH

Present Reply

Reply: B
LIKE is used with wildcards to look patterns.

Q49. Which SQL operate returns the present date and time?

A. CURRENT_DATE
B. NOW()
C. GETDATE()
D. All the above

Present Reply

Reply: D
Features like NOW() or GETDATE() return date & time, relying on SQL dialect.

Q50. The SQL COALESCE operate does what?

A. Counts rows
B. Concatenates strings
C. Returns the primary non-NULL worth
D. Computes common

Present Reply

Reply: C
COALESCE returns the primary non-NULL expression.

Q51. Which SQL operator checks membership inside a listing of values?

A. LIKE
B. IN
C. EXISTS
D. EQUALS

Present Reply

Reply: B
IN checks if a worth is in a specified set.

Q52. What does the CASE assertion present in SQL?

A. Conditional logic in queries
B. Joins tables
C. Removes duplicates
D. Creates indexes

Present Reply

Reply: A
CASE permits conditional logic in SELECT outcomes.

Q53. Which combination operate returns the variety of rows?

A. SUM()
B. AVG()
C. COUNT()
D. MAX()

Present Reply

Reply: C
COUNT() counts rows.

Q54. What does the DISTINCT key phrase do?

A. Kinds outcomes
B. Removes duplicates
C. Teams outcomes
D. Limits output

Present Reply

Reply: B
DISTINCT eliminates duplicate values.

Q55. Which SQL key phrase limits the variety of returned rows?

A. TOP
B. LIMIT
C. FETCH
D. All the above

Present Reply

Reply: D
Totally different dialects use TOP, LIMIT, FETCH.

Q56. What does the INTERSECT operator do?

A. Combines with duplicates
B. Finds widespread rows between queries
C. Removes first question outcomes
D. Joins tables

Present Reply

Reply: B
INTERSECT returns rows widespread to each SELECTs.

Q57. In SQL, which clause is required with combination features to group rows?

A. HAVING
B. GROUP BY
C. WHERE
D. ORDER BY

Present Reply

Reply: B
GROUP BY teams rows for combination features.

Q58. Which SQL command removes all information however retains the desk construction?

A. DELETE
B. DROP
C. TRUNCATE
D. REMOVE

Present Reply

Reply: C
TRUNCATE clears knowledge however not construction.

Q59. Which clause filters teams after aggregation?

A. WHERE
B. HAVING
C. FILTER
D. LIMIT

Present Reply

Reply: B
HAVING is for circumstances on grouped knowledge.

Q60. What’s the aim of the PRIMARY KEY constraint?

A. Permits duplicates
B. Uniquely identifies rows
C. Kinds rows
D. Aggregates values

Present Reply

Reply: B
PRIMARY KEY uniquely identifies rows.

Q61. Which SQL assertion is used to take away all rows from a desk however maintain the desk construction?

A. DELETE
B. DROP
C. TRUNCATE
D. REMOVE

Present Reply

Reply: C
TRUNCATE deletes all rows and retains the desk construction.

Q62. What does the SQL ORDER BY clause do?

A. Filters rows
B. Kinds rows
C. Joins tables
D. Teams rows

Present Reply

Reply: B
ORDER BY arranges the returned rows in a specified order.

Q63. Which key phrase is used to pick out distinctive knowledge?

A. UNIQUE
B. DISTINCT
C. ONLY
D. DIFFERENT

Present Reply

Reply: B
DISTINCT eliminates duplicate values in consequence units.

Q64. Which SQL operate counts all rows in a question?

A. SUM()
B. COUNT()
C. AVG()
D. LENGTH()

Present Reply

Reply: B
COUNT() returns the variety of rows.

Q65. What sort of be a part of returns all rows from each tables when there’s a match in both?

A. INNER JOIN
B. LEFT JOIN
C. RIGHT JOIN
D. FULL OUTER JOIN

Present Reply

Reply: D
FULL OUTER JOIN returns all rows with matches or not.

Q66. Which SQL key phrase is required so as to add a brand new row to a desk?

A. ADD ROW
B. INSERT INTO
C. UPDATE
D. ADD

Present Reply

Reply: B
INSERT INTO provides a brand new row.

Q67. What does the SQL IN operator do?

A. Checks equality
B. Excludes values
C. Checks if a worth matches any in a listing
D. Group outcomes

Present Reply

Reply: C
IN exams membership in opposition to a listing of values.

Q68. Which SQL key phrase modifications the construction of an current desk?

A. MODIFY
B. CHANGE
C. ALTER
D. UPDATE

Present Reply

Reply: C
ALTER TABLE modifications construction.

Q69. What does the SQL LIKE operator do?

A. Checks equality
B. Matches patterns in strings
C. Counts rows
D. Kinds rows

Present Reply

Reply: B
LIKE is used for sample matching with wildcards.

Q70. Which SQL clause is used to specify circumstances on grouped knowledge?

A. WHERE
B. HAVING
C. FILTER
D. LIMIT

Present Reply

Reply: B
HAVING filters knowledge after GROUP BY.

Q71. What does the SQL UNION operator do?

A. Combines consequence units and removes duplicates
B. Joins tables
C. Kinds outcomes
D. Teams values

Present Reply

Reply: A
UNION merges outcomes and removes duplicates.

Q72. What sort of SQL assertion is used to change current knowledge?

A. INSERT
B. DELETE
C. UPDATE
D. SELECT

Present Reply

Reply: C
UPDATE modifies current rows.

Q73. What’s the default type order in SQL?

A. DESC
B. ASC
C. NONE
D. RANDOM

Present Reply

Reply: B
ASC is the default ORDER BY order.

Q74. Which SQL assertion removes a desk and its construction?

A. REMOVE TABLE
B. DELETE TABLE
C. DROP TABLE
D. CLEAR TABLE

Present Reply

Reply: C
DROP TABLE deletes each knowledge and construction.

Q75. Which combination operate calculates the sum of values?

A. SUM()
B. COUNT()
C. AVG()
D. MAX()

Present Reply

Reply: A
SUM() totals up values.

Q76. What does the SQL EXISTS operator do?

A. Exams for sample match
B. Checks if worth exists in a set
C. Checks if subquery returns rows
D. Joins outcomes

Present Reply

Reply: C
EXISTS returns true if subquery has rows.

Q77. What’s a view in SQL?

A. Bodily desk
B. Digital desk primarily based on a question
C. Index
D. Constraint

Present Reply

Reply: B
A view is a digital consequence set.

Q78. Which SQL clause retrieves knowledge with circumstances?

A. WHERE
B. HAVING
C. GROUP BY
D. ORDER BY

Present Reply

Reply: A
WHERE applies circumstances earlier than grouping.

Q79. Which SQL assertion shows current tables in some databases?

A. SHOW TABLES
B. LIST TABLES
C. TABLES LIST
D. DISPLAY TABLES

Present Reply

Reply: A
SHOW TABLES lists tables in lots of SQL programs.

Q80. What does the COALESCE operate do?

A. Returns first non-NULL
B. Removes duplicates
C. Sums values
D. Counts rows

Present Reply

Reply: A
COALESCE returns first non-NULL worth.

Q81. Which SQL key phrase limits output rows?

A. LIMIT
B. OFFSET
C. TOP
D. All the above

Present Reply

Reply: D
Totally different SQL dialects use LIMIT, TOP, or FETCH.

Q82. Which SQL clause teams rows with similar values?

A. GROUP BY
B. ORDER BY
C. HAVING
D. FILTER

Present Reply

Reply: A
GROUP BY organizes rows into teams.

Q83. Which SQL operator compares inequality?

A. =
B. <>
C. ==
D. ~=

Present Reply

Reply: B
<> checks for not equal.

Q84. What SQL key phrase prevents NULL values?

A. NULL
B. NOT NULL
C. NO NULL
D. REQUIRED

Present Reply

Reply: B
NOT NULL prevents null entries.

Q85. Which SQL clause is used to mix outcomes from two queries and embrace duplicates?

A. UNION
B. UNION ALL
C. INTERSECT
D. JOIN

Present Reply

Reply: B
UNION ALL consists of duplicates.

Q86. What SQL operate returns the minimal worth?

A. MAX()
B. MIN()
C. AVG()
D. FIRST()

Present Reply

Reply: B
MIN() returns smallest worth.

Q87. What sort of SQL assertion is SELECT?

A. DDL
B. DML
C. TCL
D. DCL

Present Reply

Reply: B
SELECT is a DML command.

Q88. Which SQL assemble defines momentary consequence units?

A. VIEW
B. CTE
C. INDEX
D. TABLE

Present Reply

Reply: B
CTE creates a brief named question.

Q89. Which SQL key phrase is used to mix rows primarily based on a associated column?

A. UNION
B. JOIN
C. INTERSECT
D. GROUP BY

Present Reply

Reply: B
JOIN combines rows utilizing relationships.

Q90. SQL is principally used for what?

A. Creating software program
B. Manipulating databases
C. Designing web sites
D. Compiling code

Present Reply

Reply: B
SQL is for database querying and manipulation.

Q91. What does the SQL PRIMARY KEY constraint do?

A. Permits duplicates
B. Ensures distinctive rows
C. Kinds knowledge
D. Combines tables

Present Reply

Reply: B
PRIMARY KEY enforces distinctive identification.

Q92. Which clause ensures solely distinctive combos of columns?

A. UNIQUE
B. DISTINCT
C. PRIMARY KEY
D. INDEX

Present Reply

Reply: A
UNIQUE enforces no duplicates in a column set.

Q93. Which SQL function improves question execution velocity?

A. Constraint
B. View
C. Index
D. Set off

Present Reply

Reply: C
Index optimizes search efficiency.

Q94. Which clause specifies order of returned rows?

A. WHERE
B. ORDER BY
C. HAVING
D. MATCH

Present Reply

Reply: B
ORDER BY defines sorting order.

Q95. Which operator is used to examine if a worth lies in a given vary?

A. BETWEEN
B. EXISTS
C. MATCH
D. LIKE

Present Reply

Reply: A
BETWEEN selects values in a variety.

Q96. Which SQL command removes a column from a desk?

A. DROP COLUMN
B. DELETE COLUMN
C. REMOVE COLUMN
D. ALTER COLUMN

Present Reply

Reply: A
DROP COLUMN deletes a column.

Q97. What’s the objective of the SQL COUNT(*) operate?

A. Counts characters
B. Counts rows
C. Counts columns
D. Sums values

Present Reply

Reply: B
COUNT(*) returns whole rows.

Q98. Which SQL clause is used to filter knowledge earlier than grouping?

A. WHERE
B. HAVING
C. FILTER
D. LIMIT

Present Reply

Reply: A
WHERE filters earlier than teams kind.

Q99. What does the SQL GROUP BY clause do?

A. Filters teams
B. Kinds outcomes
C. Teams rows by column values
D. Combines tables

Present Reply

Reply: C
GROUP BY teams rows sharing values.

Q100. Which SQL key phrase selects solely distinct values from a column?

A. UNIQUE
B. DISTINCT
C. ONLY
D. SINGLE

Present Reply

Reply: B
DISTINCT returns distinctive values.

Abstract

This set of 100 SQL MCQ questions covers nearly each idea from fundamental SELECT statements to extra complicated JOIN operations and transaction management. By practising this SQL MCQ financial institution, you’ll develop the boldness to move any check or project. Continue to learn and exploring new questions to extend your confidence. You too can learn these Prime 50 Important SQL Interview Questions and Solutions for in-depth interview preparation.

Assets and References:

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles