Sample Header Ad - 728x90

Rownum equivalent in Informix SQL?

1 vote
2 answers
1032 views
I want to explore (=looking at the first 100 rows) databases using the *Informix* SQL dialect. - In Oracle SQL I would use SELCT* FROM table_name WHERE ROWNUM < 100 - In Postgress SQL I would use SELCT* FROM table_name limit 100 - I also tried SELCT* FROM table_name first 100 None of these methods works for Informix. **What I found:** - When looking at the documentation (https://www.ibm.com/docs/en/informix-servers/12.10?topic=programming-retrieve-multiple-rows) I only find explanations how it works internally, but not how to do it on the user side. - This question (https://stackoverflow.com/questions/119278/row-numbers-for-a-query-in-informix) only covers the issue that rum numbers shall be added to a table. **One side note:** the programm I use will do the SQL call on multiple databases and combine the resulting tables in one table.
Asked by Qaswed (121 rep)
Oct 6, 2022, 02:26 PM
Last activity: Oct 9, 2022, 12:31 PM