A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
In this case it would not be inline table-valued function, it would be multi-statement table-valued function and its syntax will be
create function ufn_Something (@默 _year int)
return @Result table (....) -- definition of the table variable here
as
begin
....
....
insert into @Result (...)
select ....
return;
end