Updated on Kisan Patel
In this tutorial, you will learn how to create computed column in sql server?
To create a computed column in in SQL Server, open the table in design view and add a column and go to Column Properties. Explore Computer Column Specification and write the Formula.
Here, we have create Student table and written computed column as Total whose value is sum of Mark1 and Mark2 column (Mark1 + Mark2) value.
While inserting record for this database table, we no need to write data for Mark1 and Mark2, and sql server automatically calculates the Total value.