db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dag H. Wanvik (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4518) Document ORDER BY and OFFSET/FETCH in subqueries
Date Thu, 21 Jan 2010 21:11:54 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803487#action_12803487
] 

Dag H. Wanvik commented on DERBY-4518:
--------------------------------------

Thanks for picking up this one, Kim! Answers to your questions:

I think the SELECT statement section is OK as it stands. As you say,
the requirements for an updatable cursor do not change.

SelectExpression topic: Yes, I suggest you put it there too for good
measure, and in the VALUES expression topic as well. The documentation
structure here is not good in that it deviates significantly from the
language, probably to make explanations "more intuitive", so it's hard
to make this non-redundant and also correct..

"Would it be okay to combine these into "a single-row or multiple-row
values expression"? I think so, yes.

"The Documentation section doesn't mention CREATE VIEW, but the "Derby
syntax changes" section does", so I'm modifying that topic too." 

That's an omission, thanks for catching that.

ORDER BY clause topic:  I suggest this wording (or some such, feel
free to improve!):

"The ORDER BY clause is an optional element of a SELECT statement (link), the
SELECT expression (link), the VALUES expression (link) and in table and scalar subqueries
(links). It can
also be used with an INSERT statement (link) and the CREATE VIEW statement (link).

An ORDER BY clause allows you to specify the order in which rows
appear in the result set. In subqueries, the ORDER BY clause is
meaningless unless accompanied by one or both of the result offset and
fetch first clauses (link) or in conjunction with ROW_NUMBER (link)
since there is no guarantee the order is retained in the outer result
set. It is allowed to combine ORDER BY on the outer query with ORDER
by in subqueries."


> Document ORDER BY and OFFSET/FETCH in subqueries
> ------------------------------------------------
>
>                 Key: DERBY-4518
>                 URL: https://issues.apache.org/jira/browse/DERBY-4518
>             Project: Derby
>          Issue Type: Improvement
>          Components: Documentation
>            Reporter: Dag H. Wanvik
>            Assignee: Kim Haase
>
> DERBY-4397 and DERBY-4398 extends the usability of ORDER BY and OFFSET/FETCH to subqueries
and view. This should be documented.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message