Server : Apache
System : Linux box5228.bluehost.com 5.14.0-687.39.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Aug 18 06:09:16 EDT 2026 x86_64
User : ttkkiedu ( 1804)
PHP Version : 8.2.33
Disable Function : NONE
Directory :  /proc/thread-self/root/usr/share/doc/firebird/sql.extensions/

📁 Create New:
⬆️ Upload File:
Current Dir [ Not Writable ] Root [ Writable ]


OR Upload from URL:
URL: Save as:

📄 File: README.offset_fetch.txt

Path: //proc/thread-self/root/usr/share/doc/firebird/sql.extensions/README.offset_fetch.txt

Size: 1.69 KB

Permissions: 0644

-----------------------
OFFSET and FETCH clause
-----------------------

  Function:
    SQL:2008 compliant equivalent for FIRST/SKIP, and an alternative for ROWS.
    The OFFSET clause specifies the number of rows to skip. The FETCH clause 
    specifies the number of rows to fetch.
    
    OFFSET and FETCH can be applied independently on top-level and nested query
    expressions.
    
  Author:
    Mark Rotteveel <mrotteveel@users.sourceforge.net>
    
  Syntax rules:
    SELECT ... [ ORDER BY <expr_list> ] 
      [ OFFSET <simple_value_expr> { ROW | ROWS } ]
      [ FETCH { FIRST | NEXT } [ <simple_value_expr> ] { ROW | ROWS } ONLY ]
    
    Where <simple_value_expr> is a (numeric) literal, a SQL parameter (?) or 
    PSQL named parameter (:namedparameter).
  
  Scope:
    DSQL, PSQL
  
  Example(s):
    1. SELECT * FROM T1
       ORDER BY COL1
       OFFSET 10 ROWS
    2. SELECT * FROM T1
       ORDER BY COL1
       FETCH FIRST 10 ROWS ONLY
    3. SELECT * FROM (
          SELECT * FROM T1
          ORDER BY COL1 DESC
          OFFSET 1 ROW
          FETCH NEXT 10 ROWS ONLY
       ) a
       ORDER BY a.COL1
       FETCH FIRST ROW ONLY
  
  Note(s):
    1. Firebird doesn't support the percentage FETCH defined in the SQL 
       standard.
    2. Firebird doesn't support the FETCH ... WITH TIES defined in the SQL
       standard.
    3. The FIRST/SKIP and ROWS clause are non-standard alternatives.
    4. The OFFSET and/or FETCH clauses cannot be combined with ROWS or 
       FIRST/SKIP on the same query expression.
    5. Expressions, column references, etc are not allowed within either clause.
    6. Contrary to the ROWS clause, OFFSET and FETCH are only available on 
       SELECT statements.

← Back to Directory Edit File 🔒 Chmod

WP File Manager