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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Modify Table Insert Calculated Column

Re: Modify Table Insert Calculated Column

From: <biggs_at_trilliant.com>
Date: 21 Apr 2006 12:10:04 -0700
Message-ID: <1145646604.241280.158600@i39g2000cwa.googlegroups.com>

Sybrand Bakker wrote:
> On 21 Apr 2006 10:02:06 -0700, biggs_at_trilliant.com wrote:
>
> >Please tell me the syntax for inserting a calculated column into an
> >Oracle 10g database. The SQL Server ALTER TABLE code won't work. A
> >simple example:
> >
> >ALTER TABLE Rentals
> > ADD TotalRentals AS TotalRentals + RentalQuantity;
> >
> >I've spent a couple hours searching the doc & Google and I'm coming up
> >emty handed. This should be simple!
> >
> >Thanks
>
> Calculated columns in a database have nothing to do with design, but
> are a denormalization. Denormalizations shouln't be simple.
> Either set up a view as Carlos suggested, or set up a trigger.
> How to do this, I will leave you as an exercise in doc reading.
>
> --
> Sybrand Bakker, Senior Oracle DBA

Thank you both. I did as Carlos suggested and created a view.

Gary Received on Fri Apr 21 2006 - 14:10:04 CDT

Original text of this message

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