in simple words it will be null
I tried a simple temporary table to verify this
declare @temp table
(
id int identity(1,1) not null ,
alpha nvarchar(50)
)
insert into @temp select 'z'
declared a variable nvarchar typeand got a value in this case, when the condition is not met, then there is zero, and if you see the print statement, then nothing will be printed
declare @test nvarchar(50)
select @test=alpha from @temp where id=70
insert into @temp select @test
select * from @temp
print @test
I just insert this again to confirm that zero exists
source
share