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!

Retrieve only first row that satisfy condition

Krishna Devi VinayakaNov 29 2014 — edited Nov 29 2014

Hi,

I have following table

create table authabs as

       (

            select 1 empid,100 absmins,'D' type  from dual union all

            select 1 empid,200 absmins,'P' type  from dual union all

            select 2 empid,300 absmins,'D' type  from dual union all

            select 3 empid,400 absmins,'D' type  from dual

         );

The following query would return two rows.

select * from authabs where empid=1;

But i just want to return single row (top or any of the rows).

I use oracle 10 g

Please help

This post has been answered by Deepak Mahto on Nov 29 2014
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 27 2014
Added on Nov 29 2014
4 comments
4,086 views