21.4k views
4 votes
Calculated fields can be entered in queries. What row should you type a calculated field in?

Field row (first row)
Table row
Totals row
Criteria row

User Darkey
by
5.0k points

1 Answer

4 votes

Computed columns in SQL are calculated columns where the value of the column will be automatically inserted according to the formula specified.

Suppose Net salary = Gross_salary – PF, so this can be created as,

Create table Employee(empno, empname, Basic, HRA, PF, Gross_Sal = Basic+HRA,Net_salary = Gross_salary-PF)

When you query Select * from Employee, all the fields along with the calculated column values will get displayed. Even if you update on the field, changes will be automatically done in calculated column.

User Fahim Uddin
by
5.1k points