TRUNCATE TRUNCATE is a DDL(Data Manipulation Language) command TRUNCATE is executed using a table lock and whole table is locked for remove all records. We cannot use Where clause with TRUNCATE. TRUNCATE removes all rows from a table. Minimal logging in transaction log, so it is performance wise faster. TRUNCATE TABLE removes the data by deallocating the data pages used to store the table data and records only the page deallocations in the transaction log. Identify column is reset to its seed value if table contains any identity column. To…
Category: Sql
Difference Between DDL and DML?
DML DML statements are SQL statements that manipulate data. DML stands for Data Manipulation Language. The SQL statements that are in the DML class are INSERT, UPDATE and DELETE. Some people also lump the SELECT statement in the DML classification. DML example SQL statements are below – SELECT – retrieve data from the a database INSERT – insert data into a table UPDATE – updates existing data within a table DELETE – Delete all records from a database table MERGE – UPSERT operation (insert or update) CALL – call a…