Skip to main content

Database Management System MCQs with Answers

Practice important Database Management System MCQs with answers and explanations.

Chapter: 29
Q481:
Which SQL operator is used to check for NULL values?
A. LIKE
B. IS
C. BETWEEN
D. IN
Correct Answer: B
Chapter: 29
Q482:
The SQL statement SELECT crCode, crName FROM course WHERE prName NOT = 'MCS' returns courses:
A. Offered to the MCS program
B. Not offered to the MCS program
C. Offered to both MCS and BCS programs
D. None of the above
Correct Answer: B
Chapter: 29
Q483:
What does the WHERE clause do when multiple tables are joined?
A. Deletes matching rows
B. Inserts data into multiple tables
C. Filters rows from multiple tables
D. Creates new tables
Correct Answer: C
Chapter: 29
Q484:
Which SQL command is used to retrieve rows where a column's value is within a certain range?
A. LIKE
B. IN
C. BETWEEN
D. EXISTS
Correct Answer: C
Chapter: 30
Q485:
The ORDER BY clause can only be used in which SQL statement?
A. INSERT
B. UPDATE
C. SELECT
D. DELETE
Correct Answer: C
Chapter: 30
Q486:
What is the default sorting order if ASC or DESC is not specified in the ORDER BY clause?
A. Ascending
B. Descending
C. Random
D. No order
Correct Answer: A
Chapter: 30
Q487:
Which of the following SQL functions converts the value to uppercase?
A. UPPER
B. LOWER
C. LEN
D. SUBSTRING
Correct Answer: A
Chapter: 30
Q488:
Which SQL function returns the current system time?
A. CURRENT_TIME
B. TIME_NOW
C. GET_TIME
D. SYSTEM_TIME
Correct Answer: A
Chapter: 30
Q489:
Which of the following is a built-in SQL function?
A. SUM
B. USER_DEFINED
C. RANDOM_FUNC
D. FUNC_USER
Correct Answer: A
Chapter: 30
Q490:
Which category does the ABS function fall under?
A. Mathematical
B. String
C. Date
D. System
Correct Answer: A
Chapter: 30
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
Correct Answer: B
Chapter: 30
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
Correct Answer: B
Chapter: 30
Q493:
Which clause is used with aggregate functions to filter the grouped results?
A. WHERE
B. GROUP BY
C. HAVING
D. ORDER BY
Correct Answer: C
Chapter: 30
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
Correct Answer: A
Chapter: 30
Q495:
In SQL, which function is used to find the average of a column?
A. SUM
B. AVG
C. COUNT
D. MIN
Correct Answer: B
Chapter: 30
Q496:
Which SQL function is used to count the total number of employees in a department?
A. COUNT
B. SUM
C. MAX
D. AVG
Correct Answer: A
Chapter: 30
Q497:
What type of join returns a Cartesian product?
A. Inner join
B. Full outer join
C. Cartesian join
D. Semi join
Correct Answer: C
Chapter: 30
Q498:
Which clause is used to filter results that are grouped in SQL?
A. WHERE
B. GROUP BY
C. HAVING
D. ORDER BY
Correct Answer: C
Chapter: 30
Q499:
Which of the following functions computes the length of a string in SQL?
A. LEN
B. LENGTH
C. SIZE
D. STRLEN
Correct Answer: A
Chapter: 30
Q500:
The DATEDIFF function in SQL falls under which category?
A. Date
B. String
C. System
D. Mathematical
Correct Answer: A

Test Your Knowledge

Take a timed quiz on Database Management System

🚀 Start Quiz Now