Question
Which of the following database operations is used to
remove all records from a table but not the table itself?Solution
The TRUNCATE operation in SQL is used to remove all rows from a table without affecting the table structure. Unlike the DELETE operation, which removes rows one at a time and can be rolled back if used with a transaction, TRUNCATE is a more efficient way to delete all records in a table because it does not generate individual row delete statements. TRUNCATE resets any identity columns and typically cannot be rolled back in most database management systems unless within a transaction. Option 1 (DELETE) removes rows from a table but allows for specific conditions (such as WHERE clauses) to filter which rows to delete. Unlike TRUNCATE, DELETE can be rolled back if wrapped in a transaction. Option 2 (DROP) removes the entire table from the database, including its structure, and is more drastic than TRUNCATE. Option 4 (REMOVE) is not a valid SQL operation. Option 5 (ALTER) is used to modify the structure of a table, such as adding or deleting columns, but it does not remove data from the table.
The US-UK AI company Sixfold signed a strategic partnership in June 2025 with which Indian IT services firm to boost AI-driven insurance underwriting?
Which electromagnetic radiation is used to cook food?
Which one of the following was not provided in the Regulating Act of 1773?
Which of the following is not the Indigenous buffalo breed in India?
In India, the highest cricket ground above sea level lies in which state?
The Reserve Bank of India (RBI) has raised the minimum net owned fund (NOF) requirement of the existing Asset Reconstruction Company (ARC) to Rs ______ ...
In 2019 which tea company launched the most expensive tea yet priced in India?
Β The Temple at Khajuraho were built during which dynasty?
Reliance Industries Limited (RIL) and which other company were featured under the "Titans" category on the βTIME100 Most Influential Companies 2024β...
How many products are covered under the Compulsory Registration Scheme (CRS) for parallel testing of select electronics goods, as announced by the Burea...