About 79 results
Open links in new tab
  1. What's the difference between TRUNCATE and DELETE in SQL

    Sep 26, 2008 · Truncate and Delete in SQL are two commands which is used to remove or delete data from table. Though quite basic in nature both Sql commands can create lot of trouble until you are …

  2. sql - Difference between drop table and truncate table? - Stack Overflow

    Deleting records from a table logs every deletion and executes delete triggers for the records deleted. Truncate is a more powerful command that empties a table without logging each row. SQL Server …

  3. sql server - Fastest way to delete all the data in a large table ...

    Oct 23, 2008 · TRUNCATE TABLE removes the data by deallocating the data pages used to store the table's data, and only the page deallocations are recorded in the transaction log. TRUNCATE TABLE …

  4. How to delete or truncate table in SQL Server? - Stack Overflow

    Aug 10, 2013 · Cannot truncate table 'Test' because it is being referenced by a FOREIGN KEY constraint. Please suggest me how to delete or truncate table by dropping constraints temporarily.

  5. Reset identity seed after deleting records in SQL Server

    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. Fewer locks are typically used.

  6. sql server - Cannot truncate table because it is being referenced by a ...

    Oct 31, 2008 · Because TRUNCATE TABLE is a DDL command, it cannot check to see whether the records in the table are being referenced by a record in the child table. This is why DELETE works …

  7. Azure function permision to truncate SQL table [duplicate]

    Jun 21, 2025 · However, you can incorporate the TRUNCATE TABLE statement within a module, such as a stored procedure, and grant appropriate permissions to the module using the EXECUTE AS …

  8. sql - Truncate with condition - Stack Overflow

    Oct 3, 2010 · 48 truncate ->this resets the entire table, is there a way via truncate to reset particular records/check conditions. For ex: i want to reset all the data and keep last 30 days inside the table. …

  9. sql server - Avoid blocking other queries while truncating table ...

    Aug 28, 2018 · begin tran truncate table table1 insert into table1 select * from table2 commit #3 is blocked by #1 and has to wait, which is understandable. However, it also puts TABLOCK on the …

  10. sql server - Permissions for truncating a table - Stack Overflow

    Jan 19, 2011 · The minimum permission required is ALTER on table_name. TRUNCATE TABLE permissions default to the table owner, members of the sysadmin fixed server role, and the …