What is the difference between Delete and Truncate?
Cristopher Coronado
Select an image from your device to upload
If the table has identity column then truncate will restart the numbering but delete will not do that when new row is inserted it will seed form the last cached number
Hello Cristopher Coronado,
Please refer this link which will help you,https://www.c-sharpcorner.com/article/difference-between-delete-truncate-and-drop-statements-in-sql-server/
Delete uses transactions and could be rolled back. Delete can use conditions to the rows to be deleted. Truncate just removes all data.
delete command is used to delete data filter by a condition and truncate delete all the data at once.Truncate is faster than delete.
Delete and truncate can rollback but if session closed then truncate can not rollback but delete can rollback by log file.