Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to limit result set size for arbitrary query in Ingres?

Tags:

sql

oracle

ingres

In Oracle, the number of rows returned in an arbitrary query can be limited by filtering on the "virtual" rownum column. Consider the following example, which will return, at most, 10 rows.

SELECT * FROM all_tables WHERE rownum <= 10

Is there a simple, generic way to do something similar in Ingres?

like image 388
Craig Day Avatar asked Mar 01 '23 08:03

Craig Day


1 Answers

Blatantly changing my answer. "Limit 10" works for MySql and others, Ingres uses

Select First 10 * from myTable

Ref

like image 89
Tnilsson Avatar answered Mar 04 '23 05:03

Tnilsson