I know this question is very similar to this one: Symmetric cross join and this one too: combinations (not permutations) from cross join in sql
But what about if we have two different tables, say A and B:
select A.id,B.id from A cross join B
and I want to consider the pair (a,b)
equal to (b,a)
?