| List: | General Discussion | « Previous MessageNext Message » | |
| From: | Baron Schwartz | Date: | August 4 2007 2:40am |
| Subject: | Re: How can I delete a block of random rows? | ||
| View as plain text | |||
Daevid Vincent wrote: > I have a SQL dump that I load in for testing with lots of "interesting" > data. > > I want to now pair that down to a smaller subset, however I can't just > delete from a range of ID's, as the data is sequential. > > I want to delete say 1000 random rows from the table. What fraction of the rows do you want to delete? 1%? DELETE FROM TABLE WHERE RAND() < .01;
| Thread | ||
|---|---|---|
| • How can I delete a block of random rows? | Daevid Vincent | 4 Aug |
| • Re: How can I delete a block of random rows? | Baron Schwartz | 4 Aug |
| • RE: How can I delete a block of random rows? | Andrew Armstrong | 4 Aug |
| • RE: How can I delete a block of random rows? | Daevid Vincent | 6 Aug |
