db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4099) Update Multiple Columns SQL
Date Sun, 26 Apr 2009 17:48:30 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4099?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12702911#action_12702911

Knut Anders Hatlen commented on DERBY-4099:

As far as I can tell, Derby's behaviour is in accordance with the SQL standard, whereas MySQL's
behaviour is not. (PostgreSQL behaves the same way as Derby, by the way.)

>From ISO/IEC 9075-2:2003 - 14.11 <update statement: searched> - General Rules:

9) The <update source> of each <set clause> is effectively evaluated for each
row of T before any row of T
is updated.

> Update Multiple Columns SQL
> ---------------------------
>                 Key: DERBY-4099
>                 URL: https://issues.apache.org/jira/browse/DERBY-4099
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Meenakshi Sundar Sitaraman
>            Priority: Critical
> When I try to execute the following query
> update table_name set n1=5, average=(n1+n2)/2 where ....
> The new value of n1 (viz. 5 in this case) is not used when calculating the average. While
the new value of n1 is used in MySQL, the old value is used in Derby.
> Appreciate your support in resolving this issue.

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

View raw message