1.

Differentiate between TRUNCATE and DELETE commands in SQL.

Answer»
TRUNCATEDELETE
It is used to remove all records from a database tableIt is used to delete specified records(ONE or more) from a database table
It is a Data Definition Language(DDL) commandIt is a Data Manipulation Language(DML) command
Faster than DELETE commandSlower compared to TRUNCATE command
Cannot be APPLIED for indexed views as it WORKS only on tablesCan be applied for indexed views


Discussion

No Comment Found