select isnull(salary,null) as SecondHighestSalary
from
employee
order by salary desc
offset 1 rows
fetch next 1 rows only
結果是空記錄
select isnull((
select salary
from
employee
order by salary desc
offset 1 rows
fetch next 1 rows only)
,null) as SecondHighestSalary
結果是null