You should google it before asking.
Truncate
- Truncate removes all the references
from database.
- Fast
- No entry in transaction log.
- Cannot be recovered if removed once.
- Page refrences are cleared.
- All or none
- Identity column gets re-initialized
to seed
- Truncate is DDL
Truncate Table tblName
No contidion can be given
Delete
- Entries are made at Transaction log.
- Recoverable
- Slow
- Per record based deletion
- References are mainained in page
- Identity starts from its previous
position
- DML
Delete FROM tableName
None of the two effects any structure to table. All references must be removed before performing any of the operation, although it doesn't applies to delete when used with Cascade
= true for delete
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…