Else Do nothing

I have T-SQL code that goes through a bunch of IF - ELSE statements, at the end I would like to say ELSE do nothing. How do I do that?
LVL 3
MorDeRorAsked:
Who is Participating?
 
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
Just dont specify the 'ELSE' clause


IF 1= 1
SELECT 1
0
 
OtanaCommented:
Just don't include the ELSE part, it's not mandatory.

For example:

IF @test = 1
  BEGIN
    SELECT * FROM Table1
  END
0
 
imran_fastCommented:
>>bunch of IF - ELSE statements

if Cond1
Stmt1
else
     if Cond2
      Stmt2
      else
           if cond3
           Stmt3
 
0
All Courses

From novice to tech pro — start learning today.