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.
Which of the following is considered an abiotic factor in an ecosystem?
National Housing Bank, the apex financial institution for housing, is a wholly owned subsidiary of which of the following organization?Â
Which Indian bank received a $500 million loan from the International Finance Corporation (IFC) to support green project financing?
What does "UNICEF" stand for?
Which of the following is true about Cash Credit (Bank Loan)?
I. Cash credit is an arrangement whereby the bank allows the borrower to draw am...
Which mountain range forms a geographical boundary between North and South India?
UNESCO World Conference on Tourism and Culture was recently organized in:
Global Competitiveness Report is published annually by:
Public sector banks to get _______ via zero-coupon bonds in the Financial Year 22.
In the 4th century BCE, the capital of Magadha was shifted to _______.