Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はいくつかのレコードを持っています
a,b b,a a,c c,a b,d d,b b,f f,b ...
私のクエリ結果で。(それらは電子メールです) 持っているための最良の方法は何ですか:
a,b a,c b,d b,f
b,a と c,a, d,b, f,b を削除しますか?
私は試した
SELECT * FROM ... WHERE MOD(ROWNUM/2)=0
しかし、それは最初の行を返すだけです
どうですか...
select distinct least(col1,col2) col1, greatest(col1, col2) col2 from my_table