SQL> DECLARE
2 x NUMBER := NULL;
3 BEGIN
4 IF x = 2 THEN
5 DBMS_OUTPUT.PUT_LINE('x contains 2');
6 ELSE
7 DBMS_OUTPUT.PUT_LINE('x doesn''t contain 2');
8 END IF;
9
10 IF x <> 2 THEN
11 DBMS_OUTPUT.PUT_LINE('x doesn''t contain 2');
12 ELSE
13 DBMS_OUTPUT.PUT_LINE('x contains 2');
14 END IF;
15 END;
16 /
PL/SQL procedure successfully completed.
SQL>
SQL>
|