私はoracle 10g EE
データベースを使用しています.1つのテーブルmytableがあり、2つの列があり、データは次のとおりです:
注:2番目の列の同じ値に基づいてデータを見つけたいのですが、最初の列に同じ値または異なる値が存在するかどうかは関係ありません。
10
A, B and C
とについて 3 回繰り返されます。these 3 are required output
同様にand20
に対して 2 回繰り返され、これらも必要な出力です。C
D
column1 column2
-------------- ---------------
A 10 //required
A 10 //required
B 10 //required
C 20//required
D 20//required
E 30--------not required as 30 is only here and not duplicated
F 40--------not required as 40 is only here and not duplicated
次の出力が必要です。つまり、2 列目に同じ値があり、1 列目に同じ値または異なる値があります。
column1 column2
-------------- ---------------
A 10
A 10
B 10
C 20
D 20