Something has changed in functions from SQL Server 2016 to version 2019.
This is the test function:
create function [dbo].[TestFunction]
(
@input uniqueidentifier
)
returns uniqueidentifier
as
begin
select top 0 @input = id from randomTable;
return
(
select @input
)
end
If I try this code in SQL Server 2016, the result is the input value, but in SQL Server 2019, the result is null.
Can someone point me to the right direction what has changed?