Why does the following expression in SQL Server return -9223372036854775808
and not 123
?
I am calling this from a stored proc where I can't pass null parameters
declare @t bigint;
set @t = -9223372036854775808; --min value for bigint / long
select ISNULL(@t, 123)