Re: [NEWBIE] How To Trim Database To N Records

2006-04-12 Thread Dominik Klein
Is there a query that will, say, trim a table down to a million rows (with some sort order, of course, as I'm interested in deleting the oldest ones)? If you have got a datecolumn, you might also want to delete anything that is older than x days (2 in my example): DELETE FROM database.table W

Re: [NEWBIE] How To Trim Database To N Records

2006-04-12 Thread Shawn Green
--- "David T. Ashley" <[EMAIL PROTECTED]> wrote: > Hi, > > I'm a beginning MySQL user ... > > I have a table of log entries. Over time, the entries could grow to > be > numerous. I'm like to trim them to a reasonable number. > > Is there a query that will, say, trim a table down to a millio

Re: [NEWBIE] How To Trim Database To N Records

2006-04-12 Thread Steve Edberg
At 11:15 PM -0400 4/12/06, David T. Ashley wrote: Hi, I'm a beginning MySQL user ... I have a table of log entries. Over time, the entries could grow to be numerous. I'm like to trim them to a reasonable number. Is there a query that will, say, trim a table down to a million rows (with some

[NEWBIE] How To Trim Database To N Records

2006-04-12 Thread David T. Ashley
Hi, I'm a beginning MySQL user ... I have a table of log entries. Over time, the entries could grow to be numerous. I'm like to trim them to a reasonable number. Is there a query that will, say, trim a table down to a million rows (with some sort order, of course, as I'm interested in deleting