Run time Calculated value in Column | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

Run time Calculated value in Column

Hi, I need small inputs on how to build calculate value column.I have table T1(StockID int, StockReservedQty int, StockActualQty int, StockAvailableQty int).I want to build a calculate column i.e.StockAvailableQty where qty should gets calculated automatically. My StockAvailableQty=StockActualQty-StockReservedQty. How can i achieve. I dont want to use Trigger to achieve this. Please provide us your inputs. Thanks and Regards
Ravi K
You can use a computed column. Roji. P. Thomas
SQL Server MVP

You can also take help of a View in this case and update the corresponding table once the values are correct. Satya SKJ
Microsoft SQL Server MVP
Writer, Contributing Editor & Moderator
This posting is provided AS IS with no rights for the sake of knowledge sharing. The greatest discovery of my generation is that a human being can alter his life by altering his attitudes of mind.