Mega Code Archive

 
Categories / MSSQL Tutorial / Transact SQL
 

Short circuit aborts any further processing of a logical expression as soon as its result can be determined

Short Circuit and Divide by Zero Using the AND Operator 8> 9> IF (0 <> 0) AND (1/0 > 0) 10>   PRINT 'Greater Than 0' 11> GO 1> Short Circuit and Divide by Zero Using the OR Operator 3> IF (1 > 0) OR (1/0 > 0) 4>   PRINT 'Greater Than 0' 5> GO Greater Than 0