我的查询是这样的。
select id,name,salary,(salary-2000) AS [Deductedsalary]
from EmployeeDetails
我想在 where 子句中使用 [Deductedsalary] 列,类似于下面的查询。
select
id, name, salary, (salary-2000) AS [Deductedsalary]
from
EmployeeDetails
where
[Deductedsalary] > 5000
注意:我不想使用带有“salary”列的过滤查询