DB2 has capabilities to limit recordset retrieved from ‘select’ statement. In these example, I use SAMPLE database with DB2 LUW.
To limit show only several top records use
select * from employee fetch first 10 rows only
This will show only to 10 records from employee table.