Database Management System MCQs with Answers
Practice important Database Management System MCQs with answers and explanations.
Multiple Choice Questions
Q501: In SQL, aggregate functions operate on how many rows?
- A: A single row
- B: A set of rows
- C: One column only
- D: Multiple columns
View Answer
B
Q502: Cartesian joins are created by joining how many rows from two tables?
- A: One row from each
- B: All rows from one to all rows of the other
- C: Only unique rows
- D: None
View Answer
B
Q503: What does the HAVING clause do in SQL?
- A: Filters records in grouped results
- B: Filters individual records
- C: Orders the results
- D: Calculates aggregate values
View Answer
A
Q504: Which function in SQL returns the maximum value in a column?
- A: MAX
- B: MIN
- C: SUM
- D: COUNT
View Answer
A
Q505: Which type of SQL function is COUNT(*)?
- A: Aggregate
- B: String
- C: Mathematical
- D: Date
View Answer
A
Q506: Which function can you use to sum the values in a column in SQL?
- A: SUM
- B: MAX
- C: AVG
- D: COUNT
View Answer
A
Q507: Which SQL statement is used to group rows based on department and count the employees with a salary over Rs. 25,000?
- A: SELECT department, COUNT(*), WHERE salary > 25000 GROUP BY department
- B: SELECT COUNT(*), WHERE salary > 25000
- C: SELECT COUNT(*), GROUP BY department
- D: SELECT COUNT(*), FROM department
View Answer
A
Q508: Which join returns all the attributes of one table with all the attributes of another, resulting in m x n rows?
- A: Inner join
- B: Outer join
- C: Cartesian join
- D: Semi join
View Answer
C
Q509: In SQL, which function converts data from one type to another?
- A: CONVERT
- B: AVG
- C: MIN
- D: LENGTH
View Answer
A
Q510: Which of the following statements is TRUE about SQL aggregate functions?
- A: Aggregate functions return multiple values
- B: Aggregate functions operate on a set of rows
- C: Aggregate functions return all columns
- D: Aggregate functions are only used with INSERT statements
View Answer
B