emile.milne
Default port
Points: 1407
More actions
November 28, 2012 at 6:34 am
#285225
Quick one
Does an IF clause always have to be followed by an ELSE clause.
If (select count(*) from table) > x
Then fire code.
Otherwise do nothing.
Ant-Green
SSC Guru
Points: 113499
November 28, 2012 at 6:38 am
#1563090
No you dont have to specify an else to do nothing
declare @i int = 1
if @i = 0
begin
select 0
end
Will just result in a "Command(s) completed successfully" message as it has nothing to do.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply