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.
In this case, we have written computed column as NetSalary whose value is Salary column value – PPFDeduction column value.
While inserting record for this database table, we do not need to write data for NetSalary column, writing value in Salary and PPFDeduction automatically calculates the NetSalary value.
Views: 1843 | Post Order: 24