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 row from the table

user587133Aug 23 2010 — edited Aug 23 2010
how do we select distinct no,code in each row from the below table :-

select * from testing

NO CODE NAME
----------- ----------- ----
12 25 A
12 24 A
13 24 B
13 24 B
12 25 A
13 24 C


select distinct(NO) ,CODE from testing .it works

NO CODE
----------- -----------
12 24
13 24
12 25

when I add one more columns it doe's not give distinct output
select distinct(NO) ,CODE,NAME from testing

NO CODE NAME
----------- ----------- ----
12 24 A
12 25 A
*13 24 B*
*13 24 C*
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2010
Added on Aug 23 2010
5 comments
705 views