create view dbo.work_years
with
schemabinding
as
select top 100 percent emp_id,e_name, birthday, hire_date, year(getdate())
- year(hire_date) as work_years
from dbo.employee
order by work_years desc
create unique clustered
index emp_id_view on dbo.work_years (emp_id)