oracle - SQL -Grab unique column combination from table -
in oracle, have table called "mytable". table has columns 'a' , 'b'. want find every unique combination of 'a' , 'b'. how this? i'd prefer in sql rather pl/sql.
example:
column | column b
dog cat cat dog horse cat dog cat
a unique combination above should return 3 rows.
thank you
select distinct columna, columnb table
or
select columna, columnb table group columna, columnb
Comments
Post a Comment