Let's say I have this block:
declare @teste int
declare teste_cur cursor
for
select campo1 from tabela
.....
while @@fetch_status = 0
begin
set @teste = 0
select @teste = campo1 from tabela where campo2 = condicao2
end
.....
If the select does not return anything, does the @test variable continue with zero (0) or not?
Seeing the answers of the colleagues below, I decided to do this IF
if @rx_num_novo is null or @rx_num_novo = ''
begin
--Aquifaço meu Update/Insert/Delete
end