On 11/15/07, Abraham, Danny <danny_abraham@bmc.com> wrote:
> With Oracle we do it with: delete ,tname> where <cond> and rownum < Y;
You could create a temporary sequence:
create temporary sequence foo_seq;
delete from foos where nextval('foo_seq') < 50000;
I'm not sure how fast nextval() is, even on temporary sequences; but
it should be reasonably fast.
If it's a FIFO queue, the table surely has some explicit order through
a column which you will need as part of the query?
Alexander.