Freshers Registration

SQL MCQs and Answers With Explanation | SQL Quiz

SQL MCQ's

SQL MCQs and Answers With Explanation: Relational databases are managed and worked on using the standard computer language known as Structured Query Language (SQL). It is crucial for anyone dealing with databases and is frequently utilized in the field of data management. Because SQL is a declarative language, users can specify what they want to do rather than how they want to achieve it. The language is adaptable and may be used for a variety of purposes, from straightforward queries to intricate data manipulation and reporting. To aid people in better comprehending SQL and its numerous components, this set of SQL MCQ Questions and Answers is provided. Have a look at this SQL MCQ Quiz/ SQL Online Test and enhance your knowledge.

SQL MCQ Questions and Answers

Everyone dealing with relational databases has to be proficient in Structured Query Language (SQL). For developers, data analysts, and data scientists, it has become a crucial tool for managing and manipulating data. Because SQL is a declarative language, users can specify what they want to do rather than how they want to achieve it. Readers can test their expertise and develop a deeper understanding of SQL by seeing the Top 65 SQL Multiple Choice Questions/ Top SQL MCQ With Answers. It can help readers prepare for interviews and other exams by practicing them with the accompanying explanations.

Join Telegram Join Telegram
Join Whatsapp Groups Join Whatsapp

SQL Multiple Choice Questions

Name SQL
Exam Type MCQ (Multiple Choice Questions)
Category Technical Quiz
Mode of Quiz Online

Top 65 SQL MCQs With Answers | SQL Quiz

1. Which keyword is used to retrieve data from a table in SQL?

a) RETRIEVE
b) SELECT
c) GET
d) FETCH

Answer: b

Explanation: The SELECT statement is used to retrieve data from one or more tables in SQL.

2. Which keyword is used to create a new table in SQL?

a) CREATE
b) ADD
c) INSERT
d) UPDATE

Answer: a

Explanation: The CREATE statement is used to create a new table in SQL.

3. Which keyword is used to delete a table in SQL?

a) DELETE
b) DROP
c) REMOVE
d) DESTROY

Answer: b

Explanation: The DROP statement is used to delete a table in SQL.

4. Which keyword is used to insert data into a table in SQL?

a) INSERT
b) ADD
c) UPDATE
d) MODIFY

Answer: a

Explanation: The INSERT statement is used to insert data into a table in SQL.

5. Which keyword is used to update data in a table in SQL?

a) ADD
b) UPDATE
c) MODIFY
d) REPLACE

Answer: b

Explanation: The UPDATE statement is used to update data in a table in SQL.

6. Which keyword is used to delete data from a table in SQL?

a) DELETE
b) REMOVE
c) ERASE
d) PURGE

Answer: a

Explanation: The DELETE statement is used to delete data from a table in SQL.

7. Which keyword is used to add a new column to a table in SQL?

a) ADD COLUMN
b) NEW COLUMN
c) INSERT COLUMN
d) APPEND COLUMN

Answer: a

Explanation: The ADD COLUMN statement is used to add a new column to a table in SQL.

8. Which keyword is used to remove a column from a table in SQL?

a) DROP COLUMN
b) REMOVE COLUMN
c) ERASE COLUMN
d) DELETE COLUMN

Answer: a

Explanation: The DROP COLUMN statement is used to remove a column from a table in SQL.

9. Which keyword is used to rename a table in SQL?

a) RENAME TABLE
b) RENAME
c) CHANGE TABLE
d) MODIFY TABLE

Answer: a

Explanation: The RENAME TABLE statement is used to rename a table in SQL.

10. Which keyword is used to sort data in a table in SQL?

a) ORDER
b) SORT
c) ARRANGE
d) SEQUENCE

Answer: a

Explanation: The ORDER BY statement is used to sort data in a table in SQL.

11. Which keyword is used to group data in a table in SQL?

a) GROUP
b) ARRANGE
c) SORT
d) CATEGORIZE

Answer: a

Explanation: The GROUP BY statement is used to group data in a table in SQL.

12. Which keyword is used to count the number of rows in a table in SQL?

a) COUNT
b) SUM
c) AVG
d) MAX

Answer: a

Explanation: The COUNT function is used to count the number of rows in a table in SQL.

13. Which keyword is used to calculate the average of a column in a table in SQL?

a) COUNT
b) SUM
c) AVG
d) MAX

Answer: c

Explanation: The AVG function is used to calculate the average of a column in a table in SQL.

14. Which keyword is used to calculate the maximum value of a column in a table in SQL?

a) COUNT
b) SUM
c) AVG
d) MAX

Answer: d

Explanation: The MAX function is used to calculate the maximum value of a column in a table in

15. Which keyword is used to calculate the minimum value of a column in a table in SQL?

a) MIN
b) COUNT
c) AVG
d) MAX

Answer: a

Explanation: The MIN function is used to calculate the minimum value of a column in a table in SQL.

16. Which keyword is used to select distinct values from a column in a table in SQL?

a) UNIQUE
b) DISTINCT
c) DIFFERENT
d) UNIQUE VALUES

Answer: b

Explanation: The DISTINCT keyword is used to select distinct values from a column in a table in SQL.

17. Which keyword is used to join two or more tables in SQL?

a) JOIN
b) CONNECT
c) COMBINE
d) RELATE

Answer: a

Explanation: The JOIN keyword is used to join two or more tables in SQL.

18. Which type of join returns only the matching rows from both tables in SQL?

a) INNER JOIN
b) LEFT JOIN
c) RIGHT JOIN
d) FULL OUTER JOIN

Answer: a

Explanation: The INNER JOIN returns only the matching rows from both tables in SQL.

19. Which type of join returns all the rows from the left table and matching rows from the right table in SQL?

a) INNER JOIN
b) LEFT JOIN
c) RIGHT JOIN
d) FULL OUTER JOIN

Answer: b

Explanation: The LEFT JOIN returns all the rows from the left table and matching rows from the right table in SQL.

20. Which type of join returns all the rows from the right table and matching rows from the left table in SQL?

a) INNER JOIN
b) LEFT JOIN
c) RIGHT JOIN
d) FULL OUTER JOIN

Answer: c

Explanation: The RIGHT JOIN returns all the rows from the right table and matching rows from the left table in SQL.

21. Which type of join returns all the rows from both tables in SQL?

a) INNER JOIN
b) LEFT JOIN
c) RIGHT JOIN
d) FULL OUTER JOIN

Answer: d

Explanation: The FULL OUTER JOIN returns all the rows from both tables in SQL.

22. Which keyword is used to set a condition in SQL?

a) WHERE
b) IF
c) THEN
d) ELSE

Answer: a

Explanation: The WHERE keyword is used to set a condition in SQL.

23. Which operator is used to check for equality in SQL?

a) =
b) ==
c) !=
d) <>

Answer: a

Explanation: The = operator is used to check for equality in SQL.

24. Which operator is used to check for inequality in SQL?

a) =
b) ==
c) !=
d) <>

Answer: c

Explanation: The != or <> operator is used to check for inequality in SQL.

25. Which operator is used to check if a value is between two other values in SQL?

a) BETWEEN
b) IN
c) LIKE
d) IS NULL

Answer: a

Explanation: The BETWEEN operator is used to checking if a value is between two other values in SQL.

26. Which operator is used to check if a value is in a list of values in SQL?

a) BETWEEN
b) IN
c) LIKE
d) IS NULL

Answer: b

Explanation: The IN operator is used to check if a value is in a list of values in SQL.

27. Which operator is used to search for a pattern in a column in SQL?

a) BETWEEN
b) IN
c) LIKE
d) IS NULL

Answer: c

Explanation: The LIKE operator is used to search for a pattern in a column in SQL.

28. Which operator is used to check if a value is NULL in SQL?

a) IS NULL
b) NULL
c) NOT NULL
d) EXISTS

Answer: a

Explanation: The IS NULL operator is used to check if a value is NULL in SQL.

29. Which keyword is used to group rows based on the values of a column in SQL?

a) GROUP
b) BY
c) HAVING
d) WHERE

Answer: b

Explanation: The BY keyword is used to group rows based on the values of a column in SQL.

30. Which keyword is used to filter rows based on a condition after grouping in SQL?

a) GROUP
b) BY
c) HAVING
d) WHERE

Answer: c

Explanation: The HAVING keyword is used to filter rows based on a condition after grouping in SQL.

31. Which keyword is used to sort rows in a result set in SQL?

a) SORT
b) BY
c) ORDER
d) RANK

Answer: c

Explanation: The ORDER keyword is used to sort rows in a result set in SQL.

32. Which keyword is used to limit the number of rows returned by a query in SQL?

a) LIMIT
b) TOP
c) ROWS
d) FETCH

Answer: a

Explanation: The LIMIT keyword is used to limit the number of rows returned by a query in SQL.

33. Which function is used to count the number of rows in a table in SQL?

a) COUNT
b) SUM
c) AVG
d) MAX

Answer: a

Explanation: The COUNT function is used to count the number of rows in a table in SQL.

34. Which function is used to calculate the sum of a column in a table in SQL?

a) COUNT
b) SUM
c) AVG
d) MAX

Answer: b

Explanation: The SUM function is used to calculate the sum of a column in a table in SQL.

35. Which function is used to calculate the average value of a column in a table in SQL?

a) COUNT
b) SUM
c) AVG
d) MAX

Answer: c

Explanation: The AVG function is used to calculate the average value of a column in a table in SQL.

36. Which function is used to calculate the maximum value of a column in a table in SQL?

a) COUNT
b) SUM
c) AVG
d) MAX

Answer: d

Explanation: The MAX function is used to calculate the maximum value of a column in a table in SQL.

37. Which statement is used to add a new row to a table in SQL?

a) ADD
b) INSERT
c) UPDATE
d) MODIFY

Answer: b

Explanation: The INSERT statement is used to add a new row to a table in SQL.

38. Which statement is used to update an existing row in a table in SQL?

a) ADD
b) INSERT
c) UPDATE
d) MODIFY

Answer: c

Explanation: The UPDATE statement is used to update an existing row in a table in SQL.

39. Which statement is used to delete a row from a table in SQL?

a) REMOVE
b) DELETE
c) DROP
d) TRUNCATE

Answer: b

Explanation: The DELETE statement is used to delete a row from a table in SQL.

40. Which statement is used to delete all the rows from a table in SQL?

a) REMOVE
b) DELETE
c) DROP
d) TRUNCATE

Answer: d

Explanation: The TRUNCATE statement is used to delete all the rows from a table in SQL.

41. Which statement is used to drop a table in SQL?

a) REMOVE
b) DELETE
c) DROP
d) TRUNCATE

Answer: c

Explanation: The DROP statement is used to drop a table in SQL.

42. Which operator is used to concatenate strings in SQL?

a) ||
b) +
c) &
d) CONCAT

Answer: a

Explanation: The || operator is used to concatenate strings in SQL.

43. Which keyword is used to specify a condition that must be true for a row to be returned in SQL?

a) WHERE
b) GROUP
c) BY
d) HAVING

Answer: a

Explanation: The WHERE keyword is used to specify a condition that must be true for a row to be returned in SQL.

44. Which keyword is used to join two or more tables in SQL?

a) JOIN
b) UNION
c) OUTER JOIN
d) INTERSECT

Answer: a

Explanation: The JOIN keyword is used to join two or more tables in SQL.

45. Which type of join returns only the rows that match in both tables in SQL?

a) INNER JOIN
b) OUTER JOIN
c) LEFT JOIN
d) RIGHT JOIN

Answer: a

Explanation: The INNER JOIN type of join returns only the rows that match in both tables in SQL.

46. Which type of join returns all the rows from the left table and the matching rows from the right table in SQL?

a) INNER JOIN
b) OUTER JOIN
c) LEFT JOIN
d) RIGHT JOIN

Answer: c

Explanation: The LEFT JOIN type of join returns all the rows from the left table and the matching rows from the right table in SQL.

47. Which type of join returns all the rows from the right table and the matching rows from the left table in SQL?

a) INNER JOIN
b) OUTER JOIN
c) LEFT JOIN
d) RIGHT JOIN

Answer: d

Explanation: The RIGHT JOIN type of join returns all the rows from the right table and the matching rows from the left table in SQL.

48. Which keyword is used to specify the columns to be selected in a SQL query?

a) SELECT
b) FROM
c) WHERE
d) ORDER BY

Answer: a

Explanation: The SELECT keyword is used to specify the columns to be selected in a SQL query.

49. Which keyword is used to specify the table from which to select data in a SQL query?

a) SELECT
b) FROM
c) WHERE
d) ORDER BY

Answer: b

Explanation: The FROM keyword is used to specify the table from which to select data in a SQL query.

50. Which keyword is used to specify a condition that must be true for a row to be included in a SQL query?

a) SELECT
b) FROM
c) WHERE
d) ORDER BY

Answer: c

Explanation: The WHERE keyword is used to specify a condition that must be true for a row to be included in a SQL query.

51. Which keyword is used to sort the result set in a SQL query?

a) SELECT
b) FROM
c) WHERE
d) ORDER BY

Answer: d

Explanation: The ORDER BY keyword is used to sort the result set in a SQL query.

52. Which statement is used to create a new table in SQL?

a) CREATE TABLE
b) ALTER TABLE
c) DROP TABLE
d) TRUNCATE TABLE

Answer: a

Explanation: The CREATE TABLE statement is used to create a new table in SQL.

53. Which statement is used to add a column to an existing table in SQL?

a) CREATE COLUMN
b) ADD COLUMN
c) ALTER COLUMN
d) MODIFY COLUMN

Answer: b

Explanation: The ADD COLUMN statement is used to add a column to

54. Which statement is used to modify the structure of an existing table in SQL?

a) CREATE TABLE
b) ALTER TABLE
c) DROP TABLE
d) TRUNCATE TABLE

Answer: b

Explanation: The ALTER TABLE statement is used to modify the structure of an existing table in SQL.

55. Which statement is used to delete a column from an existing table in SQL?

a) CREATE COLUMN
b) ADD COLUMN
c) ALTER COLUMN
d) DROP COLUMN

Answer: d

Explanation: The DROP COLUMN statement is used to delete a column from an existing table in SQL.

56. Which keyword is used to specify a value to insert into a column in SQL?

a) VALUE
b) VALUES
c) SET
d) INSERT

Answer: b

Explanation: The VALUES keyword is used to specify a value to insert into a column in SQL.

57. Which statement is used to update data in a table in SQL?

a) SELECT
b) INSERT
c) UPDATE
d) DELETE

Answer: c

Explanation: The UPDATE statement is used to update data in a table in SQL.

58. Which function is used to return the number of rows in a table in SQL?

a) COUNT
b) MAX
c) MIN
d) AVG

Answer: a

Explanation: The COUNT function is used to return the number of rows in a table in SQL.

59. Which function is used to return the maximum value in a column in SQL?

a) COUNT
b) MAX
c) MIN
d) AVG

Answer: b

Explanation: The MAX function is used to return the maximum value in a column in SQL.

60. Which function is used to return the minimum value in a column in SQL?

a) COUNT
b) MAX
c) MIN
d) AVG

Answer: c

Explanation: The MIN function is used to return the minimum value in a column in SQL.

61. Which function is used to return the average value in a column in SQL?

a) COUNT
b) MAX
c) MIN
d) AVG

Answer: d

Explanation: The AVG function is used to return the average value in a column in SQL.

62. Which function is used to return the sum of values in a column in SQL?

a) COUNT
b) MAX
c) MIN
d) SUM

Answer: d

Explanation: The SUM function is used to return the sum of values in a column in SQL.

63. Which operator is used to test for the existence of a subquery in SQL?

a) EXISTS
b) IN
c) NOT IN
d) BETWEEN

Answer: a

Explanation: The EXISTS operator is used to test for the existence of a subquery in SQL.

64. Which operator is used to test whether a value is within a specified range in SQL?

a) EXISTS
b) IN
c) NOT IN
d) BETWEEN

Answer: d

Explanation: The BETWEEN operator is used to testing whether a value is within a specified range in SQL.

65. Which function is used to return the current date and time in SQL?

a) CURRENT_TIMESTAMP
b) NOW
c) SYSDATE
d) GETDATE

Answer: a

Explanation: The CURRENT_TIMESTAMP function is used to return the current date and time in SQL.

To sum up, SQL (Structured Query Language) is a language that is frequently used to manage and work with data in relational databases. Everyone working with databases should have a firm grasp of SQL and all of its available commands and functions. Several of the fundamentals of SQL, such as data types, aggregate functions, and retrieval statements, are covered in these SQL MCQ Questions and Answers. You can assess your knowledge and improve your comprehension of SQL by practicing through this SQL Online Test. Follow our FreshersNow website frequently to receive more updates on technical quizzes.

Freshersnow.com is one of the best job sites in India. On this website you can find list of jobs such as IT jobs, government jobs, bank jobs, railway jobs, work from home jobs, part time jobs, online jobs, pharmacist jobs, software jobs etc. Along with employment updates, we also provide online classes for various courses through our android app. Freshersnow.com also offers recruitment board to employers to post their job advertisements for free.