Skip to main content

Database Management System MCQs with Answers

Practice important Database Management System MCQs with answers and explanations.

Chapter: 26
Q421:
Which SQL data type is most appropriate for storing decimal values with fixed precision?
A. DECIMAL
B. CHAR
C. INT
D. FLOAT
Correct Answer: A
Chapter: 26
Q422:
What is the purpose of the REFERENCES keyword in SQL table creation?
A. To define the primary key
B. To create an index
C. To define a foreign key
D. To delete a table
Correct Answer: C
Chapter: 26
Q423:
Fill in the blank: The ON DELETE CASCADE clause is used to ______.
A. Update a table
B. Automatically delete related records
C. Prevent delete operations
D. Insert new rows
Correct Answer: B
Chapter: 27
Q424:
What does the ALTER TABLE statement do in SQL?
A. Adds constraints
B. Modifies an existing table
C. Deletes tables
D. Inserts new rows
Correct Answer: B
Chapter: 27
Q425:
Which command is used to delete all rows from a table in SQL?
A. DELETE
B. DROP
C. TRUNCATE
D. ALTER
Correct Answer: C
Chapter: 27
Q426:
The ALTER TABLE statement cannot ______.
A. Add columns
B. Modify column types
C. Delete a column
D. Add multiple columns at once
Correct Answer: D
Chapter: 27
Q427:
In the ALTER TABLE statement, which option is used to rename a column?
A. ALTER COLUMN
B. RENAME COLUMN
C. DROP COLUMN
D. SET DEFAULT
Correct Answer: B
Chapter: 27
Q428:
What happens when the TRUNCATE command is executed on a table?
A. Deletes table
B. Deletes all rows but keeps the structure
C. Deletes specific rows
D. Deletes rows conditionally
Correct Answer: B
Chapter: 27
Q429:
Which of the following SQL commands is used to add records to a table?
A. SELECT
B. INSERT
C. DELETE
D. UPDATE
Correct Answer: B
Chapter: 27
Q430:
The DELETE command in SQL does what?
A. Adds new rows
B. Deletes records conditionally
C. Deletes the entire table
D. Modifies existing rows
Correct Answer: B
Chapter: 27
Q431:
Which SQL command allows you to modify existing rows in a table?
A. INSERT
B. UPDATE
C. DELETE
D. SELECT
Correct Answer: B
Chapter: 27
Q432:
The INSERT statement must follow specific rules, such as:
A. Values must match data types
B. Values can exceed column size
C. Columns can be omitted
D. Any values can be inserted
Correct Answer: A
Chapter: 27
Q433:
What is the purpose of the DROP TABLE command in SQL?
A. Add columns to a table
B. Remove a table from the database
C. Update records in a table
D. Delete specific rows
Correct Answer: B
Chapter: 27
Q434:
Which SQL statement is used to retrieve data from a database?
A. INSERT
B. DELETE
C. UPDATE
D. SELECT
Correct Answer: D
Chapter: 27
Q435:
What is one of the principal characteristics of 4GLs like SQL?
A. Non-procedural nature
B. Focus on hardware
C. Requires manual indexing
D. Dependent on storage method
Correct Answer: A
Chapter: 27
Q436:
What command is used to delete one or more records from a table in SQL?
A. INSERT
B. DELETE
C. TRUNCATE
D. UPDATE
Correct Answer: B
Chapter: 27
Q437:
How does SQL handle the retrieval of data?
A. It focuses on how to get data
B. It requires manual storage management
C. It specifies only what data is needed
D. It relies on primary indices
Correct Answer: C
Chapter: 27
Q438:
Which of the following commands is used to add a foreign key constraint?
A. ALTER TABLE
B. ADD CONSTRAINT
C. DROP COLUMN
D. DELETE
Correct Answer: A
Chapter: 27
Q439:
When would you use the DROP COLUMN command in SQL?
A. To delete a record
B. To remove a column from a table
C. To rename a table
D. To update a record
Correct Answer: B
Chapter: 27
Q440:
What is the purpose of the RENAME COLUMN statement?
A. Change the type of a column
B. Drop a column
C. Change a column name
D. Add a new column
Correct Answer: C

Test Your Knowledge

Take a timed quiz on Database Management System

🚀 Start Quiz Now