How to get unique rows from a table
i've a file with data in the following format
id element1 element2 element3 element4 elemet5
1 A B C NULL NULL
2 A D NULL NULL NULL
3 C B A NULL NULL
4 A D NULL NULL NULL
5 F C A O B
i want to get the unique rows only ,in above example rows with ids 1 and 3 are redundant(have the same elements,the sequence doesn't matter) and rows 2 and 4 are also redundant.
i would like to know the most efficient way to get the unique rows from the above table.
Thank you very much.