SQL Server with Mr. Denny:

DELETE statement

1

May 4, 2009  11:00 AM

How can I remove duplicate records in my tables?



Posted by: Denny Cherry
CTE, DELETE statement, SQL Server 2005, SQL Server 2008, T/SQL

All to often we end up with duplicate rows in a table.  The best way to keep duplicate rows out of the database is to not let them in.  But assume that they are there.  This bit of sample code shows how to delete those duplicate rows quickly and easily in a single statement.  No temp tables...

July 14, 2008  11:00 AM

Using batching to do large operations without filling the transaction log



Posted by: Denny Cherry
DELETE statement, Query tuning, SQL, Tables

Deleting large amounts of data from a table is usually an important task, but if you don't have a maintenance window to work within then you can end up causing locking and blocking against the other processes which are accessing the database.  Not to mention you will cause a very large amount of...


April 21, 2008  9:00 AM

Back To Basics: The DELETE Statement



Posted by: Denny Cherry
DELETE statement, SQL

When you have data in your table that you need to remove the DELETE statement is the way to do that.  Using the DELETE statement without any WHERE clause will remove all the data from your table.  The WHERE clause works the same way as the WHERE clause for SELECT and UPDATE...


1

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to: