Database Management System MCQs with Answers
Practice important Database Management System MCQs with answers and explanations.
Chapter: 27
Q441:
Which SQL statement is used to change data in a table?
A. INSERT
B. SELECT
C. UPDATE
D. DELETE
Correct Answer:
C
Chapter: 27
Q442:
What does the INSERT...SELECT statement do?
A. Inserts a single row
B. Joins tables and inserts rows based on SELECT
C. Deletes rows from one table
D. Creates a new table
Correct Answer:
B
Chapter: 27
Q443:
Which command is procedural in SQL DML?
A. SELECT
B. UPDATE
C. INSERT
D. Both A and C
Correct Answer:
D
Chapter: 27
Q444:
What is the main purpose of SQL's DELETE statement?
A. Insert rows
B. Delete rows conditionally
C. Update rows
D. Add a column
Correct Answer:
B
Chapter: 28
Q445:
What does the INSERT INTO statement do?
A. Deletes records from a table
B. Updates records in a table
C. Inserts records into a table
D. Joins two tables
Correct Answer:
C
Chapter: 28
Q446:
How many formats does the INSERT INTO statement have?
A. One
B. Two
C. Three
D. Four
Correct Answer:
B
Chapter: 28
Q447:
What does the VALUES clause in an INSERT statement specify?
A. Table name
B. Query name
C. Values to place in columns
D. Attribute name
Correct Answer:
C
Chapter: 28
Q448:
Which clause is used to retrieve data from a table in SQL?
A. INSERT
B. DELETE
C. SELECT
D. UPDATE
Correct Answer:
C
Chapter: 28
Q449:
The basic SELECT statement has how many clauses?
A. One
B. Two
C. Three
D. Four
Correct Answer:
C
Chapter: 28
Q450:
What is the purpose of the WHERE clause in an SQL SELECT statement?
A. To specify which columns are retrieved
B. To filter rows based on a condition
C. To specify the table being queried
D. To list table columns
Correct Answer:
B
Chapter: 28
Q451:
What keyword is used to avoid duplicate values in an SQL query?
A. UNIQUE
B. DISTINCT
C. FILTER
D. CHECK
Correct Answer:
B
Chapter: 28
Q452:
What is the output of the query: SELECT * FROM students;?
A. Only selected rows
B. All rows and all columns
C. Only rows with a condition
D. Only the first row
Correct Answer:
B
Chapter: 28
Q453:
Which of the following is optional in a SELECT statement?
A. SELECT clause
B. FROM clause
C. WHERE clause
D. VALUES clause
Correct Answer:
C
Chapter: 28
Q454:
The INSERT INTO statement can insert values for which types of columns?
A. Non-nullable columns only
B. All columns if NULL is allowed
C. Primary key columns only
D. Foreign key columns only
Correct Answer:
B
Chapter: 28
Q455:
Fill in the blank: The ____ clause specifies which table rows are used.
A. SELECT
B. FROM
C. WHERE
D. VALUES
Correct Answer:
C
Chapter: 28
Q456:
The AS keyword is used for which purpose in SQL?
A. Create a new table
B. Assign an alias to a column
C. Sort the results of a query
D. Specify conditions
Correct Answer:
B
Chapter: 28
Q457:
Which of the following is NOT a valid SQL clause?
A. FROM
B. UPDATE
C. SELECT
D. CREATE
Correct Answer:
B
Chapter: 28
Q458:
The SELECT DISTINCT statement is used to _____.
A. Filter rows based on conditions
B. Retrieve all rows
C. Select only unique values
D. Select only null values
Correct Answer:
C
Chapter: 28
Q459:
The query SELECT stName, prName FROM student; returns which data?
A. Only student names
B. Only program names
C. Both student names and program names
D. Only student IDs
Correct Answer:
C
Chapter: 28
Q460:
What is the format of the simplest SELECT statement?
A. SELECT * FROM table_name
B. SELECT DISTINCT FROM table_name
C. SELECT WHERE table_name
D. SELECT FROM VALUES
Correct Answer:
A