2012-12-18 122 views
1

我想查找一些數據,有些結果是重複的,但是我想過濾掉重複的數據。Informix防止重複結果

示例數據檢索:

aaa, bbb, ccc, ddd, eee <---Just one copy 
aaa, qqq, eee, fff, hhh 
bbb, rrr, ggg, lll, mmm 
aaa, bbb, ccc, ddd, lll 

誰能幫我:我想

aaa, bbb, ccc, ddd, eee <---Duplicate 
aaa, qqq, eee, fff, hhh 
bbb, rrr, ggg, lll, mmm 
aaa, bbb, ccc, ddd, eee <---Duplicate 
aaa, bbb, ccc, ddd, eee <---Duplicate 
aaa, bbb, ccc, ddd, lll 

示例數據!

回答

2

您可以使用DISTINCTSELECT

SELECT DISTINCT col1, col2, col3, col4, col5 FROM table 
+0

喬納森·萊弗勒,非常感謝 – tommy5115