Skip to main content

Database Management System MCQs with Answers

Practice important Database Management System MCQs with answers and explanations.

Multiple Choice Questions

Q491: Which SQL clause is used to group results based on one or more columns?
  • A: WHERE
  • B: GROUP BY
  • C: HAVING
  • D: ORDER BY
View Answer
B

Q492: What does the COUNT(*) function return?
  • A: Number of unique rows
  • B: Total number of rows
  • C: Maximum value in a column
  • D: Minimum value in a column
View Answer
B

Q493: Which clause is used with aggregate functions to filter the grouped results?
  • A: WHERE
  • B: GROUP BY
  • C: HAVING
  • D: ORDER BY
View Answer
C

Q494: What will be the result of the following SQL statement? SELECT department, SUM(sales) FROM order_details GROUP BY department HAVING SUM(sales) > 1000;
  • A: Departments with sales over 1000
  • B: All departments
  • C: Departments with sales less than 1000
  • D: None
View Answer
A

Q495: In SQL, which function is used to find the average of a column?
  • A: SUM
  • B: AVG
  • C: COUNT
  • D: MIN
View Answer
B

Q496: Which SQL function is used to count the total number of employees in a department?
  • A: COUNT
  • B: SUM
  • C: MAX
  • D: AVG
View Answer
A

Q497: What type of join returns a Cartesian product?
  • A: Inner join
  • B: Full outer join
  • C: Cartesian join
  • D: Semi join
View Answer
C

Q498: Which clause is used to filter results that are grouped in SQL?
  • A: WHERE
  • B: GROUP BY
  • C: HAVING
  • D: ORDER BY
View Answer
C

Q499: Which of the following functions computes the length of a string in SQL?
  • A: LEN
  • B: LENGTH
  • C: SIZE
  • D: STRLEN
View Answer
A

Q500: The DATEDIFF function in SQL falls under which category?
  • A: Date
  • B: String
  • C: System
  • D: Mathematical
View Answer
A

Test Your Knowledge

Take a timed quiz on Database Management System

🚀 Start Quiz Now