Subject | Re: [firebird-support] How to delete the output of this "select first 100 seqno from repl_log where relationno =11 order by seqno" |
---|---|
Author | Milan Babuskov |
Post date | 2005-06-01T09:45:08Z |
Mohd. Jeffry wrote:
delete from repl_log r
where 101 > (
select count(*) from from
repl_log r2 where relationno = 11
and r2.seqno < r.seqno)
2. Use a stored procedure:
for
select first 100 seqno
from repl_log
where relationno = 11
order by seqno
into :seqno
do
delete from repl_log where seqno = :seqno;
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org
> How to delete the output of this "select first 100 seqno from repl_log1. Not very efficient:
> where relationno =11 order by seqno"
delete from repl_log r
where 101 > (
select count(*) from from
repl_log r2 where relationno = 11
and r2.seqno < r.seqno)
2. Use a stored procedure:
for
select first 100 seqno
from repl_log
where relationno = 11
order by seqno
into :seqno
do
delete from repl_log where seqno = :seqno;
--
Milan Babuskov
http://fbexport.sourceforge.net
http://www.flamerobin.org