Their values are recalculated each time they are referenced in a query.
CREATE TABLE orders
(orderid INT NOT NULL,
price MONEY NOT NULL,
quantity INT NOT NULL,
orderdate DATETIME NOT NULL,
total AS price * quantity PERSISTED,
shippeddate AS DATEADD (DAY, 7, orderdate))
GO
drop table orders;
GO
3.4.Computed Columns |
| 3.4.1. | Computed columns are (by default) virtual columns not physically stored in the table. |