lundi 29 août 2016

multiple or conditions in if else statements best way oracle pl sql

I have below scenario where i have to check multiple or conditions to check if local varibale should not be equal to A, B, C, D and so on. Obviously real values are different than I refered here. I want to know which one is the best from below or any other possible way:

IF(condition1 AND (myLocalVAr NOT IN ('A','B','C','D','E','F') ) ) THEN
----
--
END IF;

or

IF(condition1 AND (myLocalVAr <> 'A' OR myLocalVAr <> 'B' OR myLocalVAr <> 'C'--'D'--'E'--'F' --so on) ) ) THEN
----
--
END IF; 

Aucun commentaire:

Enregistrer un commentaire