hardMultiple Choice
FC0-U71 Practice Question: A database administrator needs to remove all rows…
A database administrator needs to remove all rows from the 'Log' table but keep the table structure for future use. The administrator also wants the operation to be irreversible (cannot be rolled back). Which SQL statement should be used?
⚠ Common exam trap
Many exam-takers confuse TRUNCATE with DELETE, thinking both are reversible, or they mistakenly believe DROP TABLE preserves the structure, when in fact TRUNCATE is the only option that removes all rows irreversibly while keeping the table schema intact.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
TRUNCATE TABLE Log;
TRUNCATE TABLE Log; is correct because it removes all rows from the table while preserving the table structure (columns, constraints, indexes) for future use. Unlike DELETE, TRUNCATE is a DDL operation that does not generate individual row deletion logs, making it irreversible and cannot be rolled back in most database systems.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
DELETE FROM Log;
Why it's wrong here
DELETE FROM removes rows but writes each deletion to the transaction log, so it can be rolled back and does not satisfy the irreversibility requirement. It is tempting because DELETE is the standard row-removal statement, which suits selective deletion with a WHERE clause where rollback capability is desirable.
- ✗
ALTER TABLE Log REMOVE ROWS;
Why it's wrong here
ALTER TABLE supports adding, dropping or modifying columns, constraints and indexes; REMOVE ROWS is not valid syntax in any mainstream SQL dialect, so the statement cannot execute. It is tempting because ALTER TABLE is the DDL command for structural changes, which suits schema modification rather than row deletion.
- ✓
TRUNCATE TABLE Log;
Why this is correct
TRUNCATE TABLE deallocates the data pages directly rather than logging each row deletion, so it removes all rows while preserving the table's structure. Because it is minimally logged and performs no row-by-row rollback, the operation cannot be reversed, satisfying the irreversibility constraint.
- ✗
DROP TABLE Log;
Why it's wrong here
DROP TABLE removes the table definition along with its rows, so the structure cannot be kept for future use as the stem requires. It is tempting because DROP is irreversible and fast, which suits permanently decommissioning a table that will never be needed again.
About these practice questions
Courseiva writes every FC0-U71 question from scratch — 988 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on FC0-U71
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. Which SQL statement is used to remove all rows from a table while keeping the table structure?
easy- A.DROP TABLE
- B.ALTER TABLE
- ✓ C.DELETE FROM table_name;
- D.REMOVE FROM table_name;
Why C: DELETE FROM table_name removes all rows from a table while preserving the table structure, including its columns, constraints, indexes, and relationships. It is a DML (Data Manipulation Language) operation that can be filtered with a WHERE clause and can be rolled back within a transaction. This is exactly what the question asks for.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This FC0-U71 practice question is part of Courseiva's free CompTIA certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the FC0-U71 exam.