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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whittling data

Status
Not open for further replies.

thedaver

IS-IT--Management
Jul 12, 2001
2,741
US
I have table "n" with columns: auto_id, title, date, category.

If I 'Select count(*), category from n group by category',
I see the count of items by category, as I intended.

My logic problem is that when the count(*) is >100 I want to delete the oldest rows (as determined by column 'time') until there are <=100 rows. How can I do this??? (essentially retiring old information to the bit bucket).
THANKS!
 
I am using mySql 3.23.39 on Linux kernel 2.2.19
Thanks in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top