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.
Statements:
Only Pocket are Purse
All Chain are Pocket
A few Zip are Pocket
Conclusions:
I. Some Zip can never ...
Statement:
Only a few Lion is Leopard.
All Leopard is Tiger.
Some Leopard is Onion.Â
Conclusion:
I. No Tiger ...
Answer the following questions based on the information given below.
If A@B means A is the son of B.
A#B means A is the father of B.
...Statements:Â
Only pens are pencil
Some pens are copy
Only copies are book
Conclusion:
I. Some pencils a...
Statements:
No Summer is Winter.
Only a few Winter is Autumn
Some Summer are Spring.
Conclusions:
I. All W...
In the questions given below, there are three statements followed by three conclusions I, II and III. You have to take the three given statements to be...
Statement:
Some cables are wires.
All wires are plugs.
Conclusion:
Some cables are plugs.
All wires are plugs.
Statements:
Only few Figs is Cashews.
All Nuts are Figs.
Some Almonds are Nuts.
Conclusions:
I. Some Figs ...
Read the given statements and conclusion carefully. Assuming the information given in the statement is true, even if it appears to be at variance with...
- Statements:
Some year are month.
Each year is day.
No day is week.
Conclusions:
I. No year is week.
II. Som...