Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
declare @counter int
declare @result int
declare @tmp int
declare @done bit
set @result = 0
set @done = 0
set @counter = 1
while @done = 0
begin
set @tmp = coalesce((select field1 from table1 where field1 = @counter),0)
if @tmp <> 0 set @result = @tmp else set @done = 1
set @counter = @counter + 1
end
select @result + 1
declare @N int; set @N = 0
select @N = @N+1-abs(sign(Number-1-@N)) from blah
select nullif(@N, max(Number)) + 1 from blah