|
Using LIMIT in mySql Update script |
I've recently switched to MySql, as my present employer uses it.
Its taken a bit of getting used to, but I'm coming around to it.
One piece of functionality we have is a 'queue-ing' system. There is an image queue that users have to go through to 'vet' photos. In this instance of work I needed to update a collection of records. It didn't matter which ones, just enough to fill the queue.
2SET active = 0
3LIMIT 500;
So rather than using a where clause it seems that you can use a mySql LIMIT value, to just return a set number of records.
Simple but effective.
There are no comments for this entry.
[Add Comment] [Subscribe to Comments]