ExamPlay Light Logo
Log ind

Computer Science for IGCSE & O level - Databases (Section 4 - No. 19)

What is the difference between `TRUNCATE` and `DELETE` statements?
TRUNCATE is faster and removes all rows, while DELETE is slower and removes specific rows.
TRUNCATE removes specific rows, while DELETE removes all rows.
TRUNCATE is used to add data, while DELETE is used to modify data.
There is no difference; they perform the same function.

Forklaring

TRUNCATE is generally faster and removes all rows in a table, resetting the auto-incrementing ID. DELETE removes specified rows based on a WHERE clause, or all rows if no WHERE clause is specified.

Kommentarer (0)

Log ind for at kommentere
Reklame
BrainBehindX Inc Logo
©2026; Drevet af BrainBehindX Inc