Question: Explain the difference between DELETE and TRUNCATE commands.Answer: DELETE is used to remove rows from a table based on a condition. TRUNCATE removes all rows from a table without logging individual row deletions.Example:
|
Is it helpful?
Yes
No
Most helpful rated by users:
- What is SQL?
- What is the difference between SQL and MySQL?
- What is a primary key?
- What is an index in a database?
- What is a foreign key?