I have a table with an unknown number of records. I want to delete half of the records. I don’t care which records are deleted. What’s the most efficient way to do it?
delete from some_table where rand() < 0.5;
This will delete about half the records, most of the time.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With