AI in production without a second pair of eyes is a quick way to lose a table. Cardinal was going to add the WHERE clause. Eventually.
DELETE TOP With ORDER BY: Removing the Oldest Rows First
Use DELETE TOP safely through an ordered CTE, preview oldest rows, apply a supporting index, and remove eligible rows in bounded batches.
TRUNCATE TABLE WITH PARTITIONS: Empty One Partition Fast
TRUNCATE TABLE WITH PARTITIONS empties one partition and logs far less than DELETE. See the syntax, the index rule and the limits in SQL Server.
DBCC CHECKIDENT: Check and Fix the Next Identity Value
DBCC CHECKIDENT reports the next identity value of a table and can change it. This post runs NORESEED, the no-option form and RESEED on a small demo table. It shows how DELETE and TRUNCATE treat the counter, the duplicate key error from a value that is too low, and who may run the command.
Multi Tables – 1 Drop Statement – SQL in Sixty Seconds #134
It was taking time as well as require to write them one at a time. In today’s blog post we will see how we can drop multiple tables with a 1 drop statement.
Remove Trigger for Delete – SQL in Sixty Seconds #133
I am involved in the Comprehensive Database Performance Health Check. Today we will discuss how we can remove triggers for the Delete statement.
How to Capture Deleted Rows Without Trigger? – Interview Question of the Week #297
Question: How to Capture Deleted Rows Without Trigger?
Answer: I was recently asked by my client during the Comprehensive Database Performance Health Check.






