Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete older records

Status
Not open for further replies.

marcela24

Programmer
Feb 17, 2003
72
NL
I want to delete old records of a table, because this table is very big and it will increase very fast from now on. This table has a column for date, and i want to have in my table just the 150 newest records. The point is that my query has to be optimized because my table is very big, or the query will take a long time to be executed. Like for example order it by date desc first. What iam looking for is something more faster.
 
As a starter, check out FAQ183-3141 by Terry Broadbent. It explains how to do batch deletes and gives examples.

-SQLBill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top