Declarative Objectivity (DO) Language : Data Clauses : TAKE Clause
TAKE Clause
A TAKE clause modifies a RETURN Statement so that it returns a specified number of objects, omitting the remaining items in the result set.
  
Syntax 
takeClause : TAKE expression;
Used In 
RETURN Statement
Quick Look 
Find the vehicles that are currently in service and return the first 10:
FROM Vehicles WHERE retired == false TAKE 10 RETURN *;
Return the 11th through 20th vehicles that are currently in service:
FROM Vehicles WHERE retired == false SKIP 10 TAKE 10 RETURN *;
Discussion 
A TAKE clause causes a RETURN statement to return just the first n results. The count starts with the first result to be returned (or with the first result following any that are omitted by SKIP or SKIP WHILE clause). The expression must evaluate to a number.
You can use TAKE together with the SKIP Clause in successive executions of a query to partition the result set. The first time you execute the query, you typically use TAKE by itself to return the first “partition” (the first n results). In the second execution, you add SKIP to omit the “partition” you’ve already returned, and use TAKE to obtain a second set of results. In the third execution, you adjust the argument of SKIP to omit the first two “partitions”, while TAKE obtains the third set of results, and so on.
See also SKIP Clause, SKIP WHILE Clause, TAKE WHILE Clause.