how to use if else in ms  sql server

  By Junaid A   Posted on August-01-2022   237

MS Sql Server

how to use if else in ms  sql server


IF ( 1 <> 1) --<-- Some Expression
BEGIN
 PRINT 'One is equal to One'
END
ELSE IF (2=3)
BEGIN
 PRINT 'First expression was not true'
 END
 else
 begin
    Print 'else'
 end

By  asifjans    01-Aug-2022 Views  237



You may also read following recent Post