select EmployeesList.*,datediff(year,EmployeesList.EmployeeEnterDate,getdate()) as 'InJobTime' from EmployeesList---Geovin Du 塗聚文select EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate()) as 'InJobTime' from EmployeesListselect EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate())/12 as 'InJobTime' from EmployeesListselect EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate())%12 as 'InJobTime' from EmployeesList---工齡計算(前面整數是看多少年,小數點後兩位是多少個月)select EmployeesList.*,datediff(month,EmployeesList.EmployeeEnterDate,getdate())/12+datediff(month,EmployeesList.EmployeeEnterDate,getdate())%12*0.01 as 'InJobTime' from EmployeesList