I did a “desc” command on the STANDARD package today, the package that helps define PL/SQL, and saw the XOR function!
SQL> declare
2 x boolean;
3 begin
4 x := XOR(true,true);
5 dbms_output.put_line(case when x then 'TRUE' else 'FALSE' end);
6
7 x := XOR(true,false);
8 dbms_output.put_line(case when x then 'TRUE' else 'FALSE' end);
9
10 x := XOR(false,false);
11 dbms_output.put_line(case when x then 'TRUE' else 'FALSE' end);
12
13 end;
14 /
FALSE
TRUE
FALSE
PL/SQL procedure successfully completed.
I cant find any reference to it in the Oracle PL/SQL documentation anywhere, so its definitely not supported so using it is probably off limits until you see officially in the documentation.




Got some thoughts? Leave a comment