| -- Creating a Computed Column
/*Computed columns are sometimes useful when a calculation
must be recomputed on the same data repeatedly in referencing queries.
A computed column is based on an expression defined when you create or alter the table, and is not physically stored in
the table unless you use the PERSISTED keyword.*/
ALTER TABLE Production.TransactionHistory
ADD CostPerUnit AS (ActualCost/Quantity) |
Arkadaşlar "ADD CostPerUnit AS (ActualCost/Quantity)" kodu ne işe yarıyor.
|