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

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

Thanks for the patch, Kim! It all looks good to me.

I have one comment, which was not introducd by this patch but it relevant all 
the same:

rrefsqlj11277.html

"A VALUES expression that is used in an INSERT statement cannot use an
ORDER BY, result offset, or fetch first clause."

While correct, this statement isn't very helpful, I'd like it to say
something like this:

"A VALUES expression that is used in an INSERT statement cannot use an
ORDER BY, result offset, or fetch first clause."

"However, if the VALUES expression does not contain the DEFAULT keyword the
VALUES clause can be put in a subquery and ordered, e.g. like this:

INSERT INTO t SELECT * FROM (VALUES 'a','c','b') t ORDER BY 1;
"

Ditto i rrefsqlj40774.html (insert statement)

> 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
>         Attachments: DERBY-4518.diff, DERBY-4518.stat, DERBY-4518.zip
>
>
> 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.

Reply via email to