You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Brad Mace (JIRA)" <ji...@apache.org> on 2010/05/14 21:42:43 UTC

[jira] Created: (DERBY-4662) add LIMIT clause to UPDATE statement

add LIMIT clause to UPDATE statement
------------------------------------

                 Key: DERBY-4662
                 URL: https://issues.apache.org/jira/browse/DERBY-4662
             Project: Derby
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 10.5.3.0
            Reporter: Brad Mace


allow syntax such as `update myTable set group=1 where category='test' limit 50`  which will update the value of `group` for the first 50 records that match the where clause

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


[jira] Commented: (DERBY-4662) add LIMIT clause to UPDATE statement

Posted by "Dag H. Wanvik (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/DERBY-4662?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12867660#action_12867660 ] 

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

For queries, Derby currently does not support the LIMIT keyword, preferring the standard SQL "FETCH n NEXT/FIRST ROWS ONLY".
For updates, I don't believe the standard currently supports a limiting feature. The feature is basically not relational, but I can see it being potentially useful. 
A workaround would be to use an updatable cursor and select using the FETCH NEXT clause.

> add LIMIT clause to UPDATE statement
> ------------------------------------
>
>                 Key: DERBY-4662
>                 URL: https://issues.apache.org/jira/browse/DERBY-4662
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.5.3.0
>            Reporter: Brad Mace
>
> allow syntax such as `update myTable set group=1 where category='test' limit 50`  which will update the value of `group` for the first 50 records that match the where clause

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