Sunday, 11 May 2014

DB2 SQL -How to fetch first few records?

We can use FETCH FIRST n ROWS ONLY, if we want to display only first n rows.This should be the last statement in the SQL query.

To find first 10 rows then we mention it like
FETCH FIRST 10 ROWS ONLY

No comments:

Post a Comment