Inscrivez-vous ou connectez-vous pour rejoindre votre communauté professionnelle.
Both DELETE and TRUNCATE commands are used to delete records from table. But
TRUNCATE is DDL command like DROP, whereas DELETE is a DML command. Therefore DELETE operations can be rolled back (undone), while DROP andTRUNCATE operations cannot be rolled back
Following are 2 main differences between Delete & Truncate statements1. Delete: keeps the track of identity columns, spaces used by table remains Truncate: doesn't keep any spaces used by table, Identity begins from scratch Example: Identity column get the next record from the last generated value even all the records DELETED, but if TRUNCATED identity starts from first available value from identity 2. Delete: maintains the records in Log Truncate: deletes the records without maintaining log