How to get more columns along with distinct column values in Oracle ?
select DISTINCT cname
from customer
where code is not null;
I need cname
, cvalue
, cdate
with distinct cname
How to get more columns along with distinct column values in Oracle ?
select DISTINCT cname
from customer
where code is not null;
I need cname
, cvalue
, cdate
with distinct cname
Your question does not really make sense. DISTINCT
does not affect columns, it eliminates duplicate rows. So if you have:
a b c
a b c
d b c
Using DISTINCT
gives you:
a b c
d b c
You're going to have to be more specific in the output you're getting and what you want.