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: William Robertson <williamr2019_at_googlemail.com>
Date: Wed, 05 Sep 2007 15:43:00 -0700
Message-ID: <1189032180.307339.24230@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. Received on Wed Sep 05 2007 - 17:43:00 CDT

Original text of this message

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