db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Leroux <sylv...@chicoree.fr>
Subject Updatable cursors and generated columns
Date Thu, 18 Feb 2010 12:02:00 GMT
Hi,


By reading DERBY-1773 I had a question. Since it is only slightly related with 
that JIRA issue, I prefer posting here - rather than interfering with the 
corresponding discution.


How /should/ behave an updatable cursor on columns, when there is a generated 
column on the table which is not marked FOR UPDATE, but which is dependent of an 
updatable column.

Here is an example:
CREATE TABLE T(COL1 INT, COL2 INT, COL3 GENERATED ALWAYS AS (COL1+COL2));
SELECT COL1 FROM T FOR UPDATE OF COL1;

If I update 'COL1' from the above cursor, should COL3 be updated as well? Or 
should an error be raised?


Thanks,
Sylvain

-- 
sylvain@chicoree.fr
http://www.chicoree.fr



Mime
View raw message