Dorward Villaruz a écrit:
> i need to create a table with this property
>
>
> the fields are f1 integer , f2 integer , f3 integer defaults to f1 + f2
you shouldn't store f1+f2, as you already store f1 and f2.
> i have created something like this
>
>
> create table table1(a integer not null unique primary key, b integer not
> null, c not null default a + b)
"you can't use attributes in the default clause"
if you *really* want to do that, use a trigger after insert: update f3 with f1+f2