Need a cumulative field in a table
-
29-10-2019 - |
题
Database: Sybase ASE 15.0.3
Tables:
authors(int author_id, varchar(20) author_name)
books(int author_id,int number_of_pages)
I need to add a new field to the table "authors" for total_number_of_pages (the sum of the number of pages for all the books written by the author).
Can this be done by a (possibly materialized) computed field?
I don't like the idea of a view, I really would prefer the field to be in the table authors, if possible.
没有正确的解决方案
不隶属于 StackOverflow