Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

How can we limit the maximum number of rows returned by select clause

Hi All,

How can i limit the number of rows that are returned by the SELECT clause in the MaxDB ?

I'm looking for something similar to what LIMIT clause does in MySQL.

Regards

Raj

replied

Hi,

in the documentation of the select_statement you will find the limit_clause as well:

http://maxdb.sap.com/doc/7_6/da/ed9036dfe4b903e10000009b38f889/frameset.htm

Or you will find the top_clause in query_expression

http://maxdb.sap.com/doc/7_6/0f/486fa22f9611d3a98100a0c9449261/frameset.htm

Or you will find in the list of predicates the rowno-predicate

http://maxdb.sap.com/doc/7_6/85/166658c71b11d2a97100a0c9449261/frameset.htm

Therefore, there are different opportunities to restrict the number of rows.

Please pay attention to the fact, that only the rowno-predicate can be used

even in subqueries.

Elke

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question