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: Shakespeare <whatsin_at_xs4all.nl>
Date: Thu, 6 Sep 2007 16:18:38 +0200
Message-ID: <46e00c56$0$229$e4fe514c@news.xs4all.nl>

"William Robertson" <williamr2019_at_googlemail.com> schreef in bericht news:1189032180.307339.24230_at_k79g2000hse.googlegroups.com...
> On Aug 30, 4:11 pm, Brian Peasland <d..._at_nospam.peasland.net> wrote:
>
>> This is a new 11g feature. Found at the following:
>>
>> http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statem...
>
> Well, it's similar to an 11g new feature, but I don't see any
> GENERATED [ALWAYS] BY syntax:
>
> SQL> CREATE TABLE testtab
> 2 ( dt DATE
> 3 , year INTEGER AS ( EXTRACT(YEAR FROM dt) ) );
>
> Table created.
>
> SQL> INSERT INTO testtab(dt) VALUES(sysdate);
>
> 1 row created.
>
> SQL> SELECT * FROM testtab;
>
> DT YEAR
> ----------- ----------
> 03-SEP-2007 2007
>
> 1 row selected.
>

That is because search does not find it, it's in a picture. Just scroll and you'll see it somewhere in one of the syntax pictures.. Search for
virtual_column_definition::=

(That's why I missed it at first too)

Shakespeare Received on Thu Sep 06 2007 - 09:18:38 CDT

Original text of this message

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