Posted by Stu on 02/18/06 22:58
>From what I can see, you need to include the ALTER TABLE; eg:
ALTER TABLE chrisslu
ADD discquantity AS ((CAST(chrisslu.quantity AS int)) *
CAST(chrisslu.nr_of_disc as int))
As far as whehter or not to use a computed column, it shouldn't be a
problem if:
1. The value of the column is always dependant on the relationship with
the other columns;
2. You always use explicit column names when inserting or updating
data, and;
3. You don't plan on porting this database to another RDBMS engine.
Stu
Navigation:
[Reply to this message]
|