Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Distinct values in each column

439955Feb 20 2008 — edited Feb 23 2008
Hi

I have a table with three columns and I would like to display distinct values in each column. Could any one please help me to get the output.


col1 col2 col3
==== ==== ====
a 1 x
a 2 y
a 3 z
a 4 u
b 5 v
b 6 x
b 7 x
b 9 x
b 10 y
b 11 y
b 12 y
b 13 y
b 14 x
b 15 y
b 16 z
b 17 u
b 18 v
b 19 x
b 20 x
c 21 x
c 22 y
c 23 y
c 24 y
c 25 y
c 26 x
c 27 y
c 28 z

Output needed
===========
col1 col2 col3
==== ==== ====
a 1 x
b 2 y
c 3 z
4 u
5 v
6
7
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

Thanks
Vasanth
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 22 2008
Added on Feb 20 2008
11 comments
8,116 views