How about this:
DELETE t
WHERE ID IN
(SELECT t1.id
FROM t t1 JOIN t t2
ON (t1.val1 = t2.val2 AND
t1.val2 = t2.val1 AND
t1.id < t2.id));
I arbitrarily kept the row with the greatest ID value.
Example:
SQL> CREATE TABLE t (ID INTEGER, val1 INTEGER, val2 INTEGER);
Table created
SQL> INSERT INTO t VALUES(1,1,2);
1 row inserted
SQL> INSERT INTO t VALUES(2,1,3);
1 row inserted
SQL> INSERT INTO t VALUES(3,2,1);
1 row inserted
SQL> INSERT INTO t VALUES(4,2,3);
1 row inserted
SQL> INSERT INTO t VALUES(5,3,1);
1 row inserted
SQL> INSERT INTO t VALUES(6,3,2);
1 row inserted
SQL> INSERT INTO t VALUES(7,4,4);
1 row inserted
SQL> INSERT INTO t VALUES(8,4,4);
1 row inserted
SQL> SELECT * FROM t;
ID VAL VAL
--- --- ---
1 1 2
2 1 3
3 2 1
4 2 3
5 3 1
6 3 2
7 4 4
8 4 4
8 rows selected
SQL> DELETE t
2 WHERE ID IN (SELECT t1.id
3 FROM t t1 JOIN t t2 ON (t1.val1 = t2.val2 AND t1.val2 = t2.val1 AND t1.id < t2.id));
4 rows deleted
SQL> SELECT * FROM t;
ID VAL VAL
--- --- ---
3 2 1
5 3 1
6 3 2
8 4 4
SQL>
Easily adaptable to keep different rows, e.g.,
DELETE t
WHERE ID IN
(SELECT t1.id
FROM t t1 JOIN t t2
ON (t1.val1 = t2.val2 AND
t1.val2 = t2.val1 AND
(t2.val1 < t1.val1 OR (t2.val1 = t1.val1 AND t2.id > t1.id))));
UPDATE:
Couldn't think of a really clever way, so here's the brute force method to answer the question in your comment:
CREATE TABLE t (ID INTEGER, val1 INTEGER, val2 INTEGER, val3 INTEGER);
INSERT INTO t VALUES (1, 1, 2, 3);
INSERT INTO t VALUES (2, 1, 3, 2);
INSERT INTO t VALUES (3, 2, 1, 3);
INSERT INTO t VALUES (4, 2, 3, 1);
INSERT INTO t VALUES (5, 3, 1, 2);
INSERT INTO t VALUES (6, 3, 2, 1);
INSERT INTO t VALUES (7, 1, 2, 4);
INSERT INTO t VALUES (8, 1, 3, 5);
INSERT INTO t VALUES (9, 1, 4, 2);
INSERT INTO t VALUES (10, 1, 1, 1);
INSERT INTO t VALUES (11, 1, 1, 1);
INSERT INTO t VALUES (12, 1, 3, 5);
SQL> select * from t order by id;
ID VAL VAL VAL
--- --- --- ---
1 1 2 3
2 1 3 2
3 2 1 3
4 2 3 1
5 3 1 2
6 3 2 1
7 1 2 4
8 1 3 5
9 1 4 2
10 1 1 1
11 1 1 1
12 1 3 5
12 rows selected
DELETE FROM t
WHERE ID IN (SELECT t1.ID FROM t t1 JOIN t t2 ON (t1.val1 = t2.val1 AND
t1.val2 = t2.val2 AND
t1.val3 = t2.val3 AND t1.id < t2.id)
UNION ALL
SELECT t1.ID FROM t t1 JOIN t t2 ON (t1.val1 = t2.val1 AND
t1.val2 = t2.val3 AND
t1.val3 = t2.val2 AND t1.id < t2.id)
UNION ALL
SELECT t1.ID FROM t t1 JOIN t t2 ON (t1.val1 = t2.val2 AND
t1.val2 = t2.val1 AND
t1.val3 = t2.val3 AND t1.id < t2.id)
UNION ALL
SELECT t1.ID FROM t t1 JOIN t t2 ON (t1.val1 = t2.val2 AND
t1.val2 = t2.val3 AND
t1.val3 = t2.val1 AND t1.id < t2.id)
UNION ALL
SELECT t1.ID FROM t t1 JOIN t t2 ON (t1.val1 = t2.val3 AND
t1.val2 = t2.val1 AND
t1.val3 = t2.val2 AND t1.id < t2.id)
UNION ALL
SELECT t1.ID FROM t t1 JOIN t t2 ON (t1.val1 = t2.val3 AND
t1.val2 = t2.val2 AND
t1.val3 = t2.val1 AND t1.id < t2.id));
select * from t order by id;
ID VAL VAL VAL
--- --- --- ---
6 3 2 1
9 1 4 2
11 1 1 1
12 1 3 5