Microsoft Azure Data Fundamentals DP-900 Practice Question
You are managing an Azure SQL Database that contains a large table named SalesFact. To free up storage before a new data import, you must remove every existing row quickly while preserving the table structure, indexes, and permissions so that data can be populated again later. Which Transact-SQL statement should you use?
The TRUNCATE TABLE statement removes all rows from a table in a minimally logged operation, which is faster and uses fewer resources than deleting rows one by one. It does not delete the table definition, so the table, its indexes, and permissions remain available for future inserts. DROP TABLE would remove both the data and the table structure, which is not acceptable because the table must stay in place. DELETE FROM removes rows but is fully logged and therefore slower and more resource-intensive for large tables, though it does keep the table structure. ALTER TABLE REBUILD reorganizes storage structures and does not delete data at all. Therefore, TRUNCATE TABLE SalesFact; is the correct choice.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the difference between TRUNCATE TABLE and DELETE FROM in SQL?
Open an interactive chat with Bash
Does TRUNCATE TABLE remove indexes and permissions?
Open an interactive chat with Bash
Why is DROP TABLE not suitable in this scenario?
Open an interactive chat with Bash
Microsoft Azure Data Fundamentals DP-900
Identify considerations for relational data on Azure
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .