Posted - 04/30/2013 : 17:23:55
| Hello my dear Friends
I have to tables
country : name,code,...
now i want to know if borders table is asymetrical , symetrical means for every country if there is a (fr,de) record in borders, there also should be ((de,fr) , otherwise it is asymetrical.
so i think i should have a join between these two tables,
SELECT NVL2 ( b.country1
FROM borders a
LEFT OUTER JOIN borders b ON b.country1 = a.country2
AND b.country2 = a.country1
now its writing some "yes" ...
but it should not generate a lot of record but just print out 'yes' or 'no'
if there is at least one Yes, the answer is Yes, if there are just No, the answer is No.
im using oracle 11g
thank you so much for your help