codeface

Software.Design

Limit Rows in Interbase/Firebird SQL statement

I have wanted to use the TOP function of SQL Server to limit my rows result
and I finally found the SQL statement:

SELECT FIRST x [SKIP y] … [rest of query]

So, the FIRST function defines the limit of the rows of your query result
and SKIP opptionally function defines a quantity of rows You don’t want to show.

A good example: Google Search – Total of 20 results, Page 3.

                            SELECT FIRST 20 SKIP 40 ID, NAME from TABLE1

Thanks for http://scott.yang.id.au/2004/01/limit-in-select-statements-in-firebird/

This entry was posted on Monday, December 22nd, 2008 at 6:05 pm and is filed under Uncategorized. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Deixe seu comentário

You must be logged in to post a comment.