Subject Re: delete and skip
Author Milan Babuskov
---Dalton Calford wrote:
> delete from foo where foobar='mystuff' skip 1
> to delete duplicate records, leaving only one remaining....

You can use DB$KEY. For example, to delete duplicated foobars:

delete from foo f1
where exists (
SELECT 1 FROM foo t2
WHERE t1.foobar = t2.foobar
AND t1.RDB$DB_KEY < t2.RDB$DB_KEY
);

Example adapted from:

http://www.firebirdfaq.org/faq301

--
Milan Babuskov
http://www.guacosoft.com