Re: table sizes, rolling data.

2006-08-30 Thread Paul McCullagh
If you use an auto_increment column (e.g. id int auto_increment) then your trigger could do something like this: DELETE FROM table WHERE id < new.id - 100; On Aug 30, 2006, at 3:49 PM, Dan Buettner wrote: You could accomplish this with a trigger on the table - on INSERT, execute a DELETE st

Re: table sizes, rolling data.

2006-08-30 Thread Dan Buettner
You could accomplish this with a trigger on the table - on INSERT, execute a DELETE statement. http://dev.mysql.com/doc/refman/5.0/en/create-trigger.html You would need to find a way to identify which is the "bottom" record to be deleted ... I might use an ID column, and consider the lowest-numbe

table sizes, rolling data.

2006-08-29 Thread Tanner Postert
sorry for the double post. if i want to have a row of about 100 records. and everytime i insert a new record, it gets pushed on the top, and the bottom one gets pushed out, sort of like a heap. is this possible? i know i can just delete the record, etc, but i was wondering if there was a built i

table sizes, rolling data.

2006-08-29 Thread Tanner Postert