Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-4398

Allow OFFSET/FETCH in subqueries

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.6.1.0
    • Component/s: SQL
    • Labels:
      None
    • Urgency:
      Normal

      Description

      SQL 2008 specifies that OFFSET/FETCH (<result offset clause>, <fetch
      first clause>) may be used in subqueries. Currently, Derby only
      allows this at the outer (cursor) level. Cf. also DERBY-4397 on
      allowing ORDER BY in subqueries for this extension to be portable and
      useful.

      SQL features:

      F856 Nested <fetch first clause> in <query expression>
      F857 Top-level <fetch first clause> in <query expression> (already present in 10.5)
      F858 <fetch first clause> in subqueries
      F859 Top-level <fetch first clause> in views
      F860 dynamic <fetch first row count> in <fetch first clause> (already present in 10.5)

      F861 Top-level <result offset clause> in <query expression> (already present in 10.5)
      F862 <result offset clause> in subqueries
      F863 Nested <result offset clause> in <query expression>
      F864 Top-level <result offset clause> in views
      F865 dynamic <offset row count> in <result offset clause> (already present in 10.5)

        Attachments

        1. derby-4398-insert.stat
          1 kB
          Dag H. Wanvik
        2. derby-4398-insert.diff
          67 kB
          Dag H. Wanvik
        3. derby-4398-3.stat
          2 kB
          Dag H. Wanvik
        4. derby-4398-3.diff
          89 kB
          Dag H. Wanvik
        5. derby-4398-2.stat
          2 kB
          Dag H. Wanvik
        6. derby-4398-2.diff
          86 kB
          Dag H. Wanvik

          Issue Links

            Activity

              People

              • Assignee:
                dagw Dag H. Wanvik
                Reporter:
                dagw Dag H. Wanvik
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: