MCQ PracticeSingle Best AnswerTopic: Data definition language - MySQL
Q
Which of the following statements is true about the TRUNCATE TABLE statement in MySQL?
Question ID
#15459
Subchapter
Data definition language - MySQL
Action
Choose one option below
Choose Your Answer
Click an option to check whether your answer is correct.
A
TRUNCATE TABLE deletes the table structure and its data. ✔✖
B
TRUNCATE TABLE removes the table structure but preserves its data. ✔✖
C
TRUNCATE TABLE only removes the data from a table. ✔✖
D
TRUNCATE TABLE is not a valid statement in MySQL. ✔✖
A
Correct Answer: A
Explanation
The TRUNCATE TABLE statement in MySQL is used to delete all data from a table while preserving the table structure. It is a faster alternative to the DELETE statement for removing all rows from a table.