PQL Top

The PQL TOP Clause
The TOP clause is used to specify the number of records to return. The TOP clause can be very useful on large stables with thousands of records. Returning a large number of records can impact on performance. Note: Not all database systems support the TOP clause.

PQL TOP Example
The "Ponies" stable:

Now we want to select only the two first records in the stable above.

We use the following SELECT statement:

The result-set will look like this:

PQL TOP PERCENT Example
The "Ponies" stable:

Now we want to select only 50% of the records in the stable above.

We use the following SELECT statement:

The result-set will look like this: