1) Delete
– Delete is Data Manipulation Language command
-You can specify the tuple that you want to delete.
-DELETE command can have WHERE clause.
– DELETE command eliminate the tuples one-by-one.
– DELETE command acts slower as compared to TRUNCATE.
– DELETE command can be followed either by COMMIT or ROLLBACK.
2) Truncate
– Truncate is a Data Definition Language Command
– It deletes all the tuples from a relation.
– TRUNCATE command do not have WHERE clause.
– TRUNCATE delete the entire data page containing the tuples.
– TRUNCATE is faster as compared to DELETE.
– TRUNCATE command can’t be ROLL BACKED.
Answers ( 2 )
1) Delete
– Delete is Data Manipulation Language command
-You can specify the tuple that you want to delete.
-DELETE command can have WHERE clause.
– DELETE command eliminate the tuples one-by-one.
– DELETE command acts slower as compared to TRUNCATE.
– DELETE command can be followed either by COMMIT or ROLLBACK.
2) Truncate
– Truncate is a Data Definition Language Command
– It deletes all the tuples from a relation.
– TRUNCATE command do not have WHERE clause.
– TRUNCATE delete the entire data page containing the tuples.
– TRUNCATE is faster as compared to DELETE.
– TRUNCATE command can’t be ROLL BACKED.
-Delete
It removes data Plus Table definition or table structure
-Truncate
It only removes data from table