declare @date1 varchar(10),@date2 varchar(10)
set @date1='2019-10-10'
set @date2='2020-10-11'
select case when month(@date2)>month(@date1) then DATEDIFF(YEAR,@date1,@date2)+1
when month(@date2)=month(@date1) and Day(@date2)>DAY(@date1) then DATEDIFF(YEAR,@date1,@date2)+1
else DATEDIFF(YEAR,@date1,@date2) end