Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Generated by column syntax

Re: Generated by column syntax

From: Serge Rielau <srielau_at_ca.ibm.com>
Date: Tue, 04 Sep 2007 16:14:27 -0400
Message-ID: <5k5sl0F27q2cU1@mid.individual.net>


DA Morgan wrote:

> Jerry Alan Braga wrote:

>> I have seen on some posts that you can do the following
>>
>> alter table test add col_3 generated always by (col_1 + col_2); --
>> virtual col
>>
>> alter table test add col_3 generated by (col_1 + col_2); -- stored
>> virtual col
>>
>> what is the syntax of the generated statement, where are the docs on this
>>
> 
> There are demos of Virtual column creation and usage in Morgan's Library
> at www.psoug.org under VIRTUAL COLUMNS.
Nice, Daniel I see in your example that providing a value for the expression generated column on insert appears to be tolerated. Will it return an error if the value isn't correct or is the value simply ignored? (DB2 only allows the DEFAULT keyword if a generated column is specified)

Cheers
Serge

-- 
Serge Rielau
DB2 Solutions Development
IBM Toronto Lab
Received on Tue Sep 04 2007 - 15:14:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US