0

Is there a top operator for informix like there is in SQL Server?

I want to run a delete that will just delete the top say 1000 records based on a ordered select.

e.g.

delete from table 
 where id in (select top 1000 id from table order by date desc)
2

Yes. Use the FIRST clause with the select statemen

http://publib.boulder.ibm.com/infocenter/idshelp/v117/index.jsp?topic=/com.ibm.sqls.doc/ids_sqs_0984.htm

  • Thanks. although it turns out i dont have an informix database. It seems like i have a variant that doesn't have "FIRST". Still, cheers mate! – rumz Oct 25 '10 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.