skip to main content
SQL Engine parse tree methods for Java : damex_describeSelectTopClause
 

damex_describeSelectTopClause

This function returns details of the TOP N clauses for a SELECT query. The TOP clause indicates the maximum number of rows to be returned.
Example queries:
SELECT TOP 10 * FROM emp;
SELECT TOP 5 PERCENT * FROM emp;
int damex_describeSelectTopClause(
    long hquery,
    xo_long piNumRows,
    xo_int pbPercent)
Table 264. Parameters for damex_describeSelectTopClause
Parameter
Type
Description
IN
hquery
long
The query handle.
OUT
piNumRows
xo_long
The number of rows in the TOP clause. This number should be treated as a PERCENT if value of pbPercent is returned as TRUE.
pbPercent
xo_int
Indicates if TOP N number was specified with PERCENT option. Valid value are:
*TRUE
*FALSE
RETURN
int
DAM_SUCCESS - on success
DAM_FAILURE - on failure