The Fetch First clause is a command that is used in a standard select statement as well as a sub select statement. By using Fetch First in a standard select statement, it reduces the number of rows returned by DB2. What this means is that queries will return faster if all that is needed is the first 10 rows of a result set.
Using Fetch First in subselects not only provides this benefit but can also be used to perform complex joins
This tutorial will provide an example of how to use the Fetch First command to do a join with a sub-select statement as well as offer an equivalant syntax. The example uses a parts store to illustrate how to use this syntax.