Ud over at bruge xor-tricket i PL/SQL, kan du blot bruge en SQL-sætning
DECLARE
a number := 17;
b number := 42;
BEGIN
SELECT a, b
INTO b, a
FROM dual;
dbms_output.put_line( 'a = ' || a );
dbms_output.put_line( 'b = ' || b );
END;
som bytter de to variable uden at bruge en temp variabel
SQL> ed
Wrote file afiedt.buf
1 DECLARE
2 a number := 17;
3 b number := 42;
4 BEGIN
5 SELECT a, b
6 INTO b, a
7 FROM dual;
8 dbms_output.put_line( 'a = ' || a );
9 dbms_output.put_line( 'b = ' || b );
10* END;
SQL> /
a = 42
b = 17
PL/SQL procedure successfully completed.