Database Management System MCQs with Answers
Practice important Database Management System MCQs with answers and explanations.
Chapter: 28
Q461:
Which SQL statement is used to insert a new row into a table?
A. UPDATE
B. INSERT
C. SELECT
D. DELETE
Correct Answer:
B
Chapter: 29
Q462:
What SQL clause is used to filter the rows that satisfy a specific condition?
A. SELECT
B. WHERE
C. FROM
D. INSERT
Correct Answer:
B
Chapter: 29
Q463:
Which of the following operators is used for pattern matching in SQL?
A. LIKE
B. IN
C. BETWEEN
D. EXISTS
Correct Answer:
A
Chapter: 29
Q464:
What does the BETWEEN operator do in SQL?
A. Retrieves exact matches
B. Retrieves values within a range
C. Sorts the results
D. Deletes rows
Correct Answer:
B
Chapter: 29
Q465:
Which SQL clause is used to join multiple tables?
A. JOIN
B. SELECT
C. WHERE
D. INSERT
Correct Answer:
C
Chapter: 29
Q466:
Which comparison operator is used to check for null values in SQL?
A. BETWEEN
B. NULL
C. IS
D. IN
Correct Answer:
C
Chapter: 29
Q467:
What is the default sorting order in the ORDER BY clause?
A. DESC
B. ASC
C. RANDOM
D. GROUP
Correct Answer:
B
Chapter: 29
Q468:
The IN operator can be used to reduce the use of which SQL keyword?
A. AND
B. OR
C. NOT
D. LIKE
Correct Answer:
B
Chapter: 29
Q469:
Which operator can be used to reverse the effect of the BETWEEN operator?
A. NOT
B. IN
C. LIKE
D. OR
Correct Answer:
A
Chapter: 29
Q470:
The format of the WHERE clause in SQL includes which of the following?
A. SELECT columns FROM tables
B. INSERT columns INTO table
C. WHERE <search_condition>
D. DELETE FROM table
Correct Answer:
C
Chapter: 29
Q471:
Which function allows the use of multiple conditions in a WHERE clause?
A. BETWEEN
B. LIKE
C. AND/OR
D. NOT
Correct Answer:
C
Chapter: 29
Q472:
SQL allows rows to be filtered by specific conditions using the _______ clause.
A. SELECT
B. WHERE
C. JOIN
D. INSERT
Correct Answer:
B
Chapter: 29
Q473:
What does the ORDER BY clause do in SQL?
A. Filters rows
B. Sorts records
C. Deletes rows
D. Joins tables
Correct Answer:
B
Chapter: 29
Q474:
The SQL command SELECT * FROM suppliers WHERE supplier_id BETWEEN 10 AND 50 returns:
A. Rows with supplier_id outside the range
B. Rows with supplier_id between 10 and 50
C. All rows
D. No rows
Correct Answer:
B
Chapter: 29
Q475:
To perform pattern matching in SQL, which operator would you use?
A. LIKE
B. IN
C. BETWEEN
D. IS
Correct Answer:
A
Chapter: 29
Q476:
Which clause is required to filter specific rows in an SQL query?
A. SELECT
B. WHERE
C. INSERT
D. ORDER BY
Correct Answer:
B
Chapter: 29
Q477:
In the SQL statement SELECT crName FROM course WHERE prName = 'MCS', what is being filtered?
A. Course name
B. Program name
C. Course credits
D. Supplier name
Correct Answer:
B
Chapter: 29
Q478:
The SQL statement SELECT * FROM suppliers WHERE supplier_name = 'IBM' returns rows:
A. Where the supplier_id is 'IBM'
B. Where the supplier_name is 'IBM'
C. Where the supplier_id is between 10 and 50
D. Where the supplier_name is NULL
Correct Answer:
B
Chapter: 29
Q479:
Which of the following is a wildcard in the LIKE operator?
A. %
B. _
C. *
D. Both % and _
Correct Answer:
D
Chapter: 29
Q480:
Which SQL statement returns all supplier names and order IDs from matching records in the supplier and orders tables?
A. SELECT * FROM suppliers WHERE supplier_id = orders.supplier_id
B. SELECT supplier_name, order_id FROM suppliers WHERE supplier_id = orders.supplier_id
C. SELECT supplier_name, order_id FROM suppliers, orders WHERE supplier.supplier_id = orders.supplier_id
D. SELECT order_id FROM orders WHERE supplier_name = 'IBM'
Correct Answer:
C