On Tue, Nov 28, 2000 at 02:04:01PM +1300, John Huttley wrote:
> Thanks for your help, everyone.
>
> This is a summary of replies.
>
> 1. Calculated fields in table definitions . eg.
>
> Create table test (
> A Integer,
> B integer,
> the_sum As (A+B),
> );
>
> This functionality can be achieved through the use of views.
Using a view for this isn't quite the same functionality as a computed
field, from what I understand, since the calculation will be done at
SELECT time, rather than INSERT/UPDATE.
This can also be done with a trigger, which, while more cumbersome to
write, would be capable of doing the math at modification time.
Ross
--
Open source code is like a natural resource, it's the result of providing
food and sunshine to programmers, and then staying out of their way.
[...] [It] is not going away because it has utility for both the developers
and users independent of economic motivations. Jim Flynn, Sunnyvale, Calif.