Definition:
In Oracle PL/SQL, the term "FALSE" refers to a logical result which is returned when Oracle evaluates a condition that is not satisfied by the participating terms. For example, the statement
1 = 2
would return FALSE because "1 is not equal to 2"
Example Usage:
The anonymous PL/SQL block below tests an equality condition. A message is displayed based on the logical result.
SQL> BEGIN
IF (&A=&B) THEN
DBMS_OUTPUT.PUT_LINE('Condition True');
ELSE
DBMS_OUTPUT.PUT_LINE('Condition False');
END IF;
END;
/
Enter value for a: 1
Enter value for b: 1
old 2: IF (&A=&B) THEN
new 2: IF (1=1) THEN
Condition True
PL/SQL procedure successfully completed.
SQL> BEGIN
IF (&A=&B) THEN
DBMS_OUTPUT.PUT_LINE('Condition True');
ELSE
DBMS_OUTPUT.PUT_LINE('Condition False');
END IF;
END;
/
Enter value for a: 1
Enter value for b: 2
old 2: IF (&A=&B) THEN
new 2: IF (1=2) THEN
Condition False
PL/SQL procedure successfully completed.
Related Links: