Re: Better way (more efficient) to find existance of row

  • From: Norman Dunbar <oracle@xxxxxxxxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Tue, 21 May 2013 15:40:03 +0100

On 21/05/13 15:26, Lyall Barbour wrote:
> Hello,
>   I'm trying to find out if there's a better/faster way to find the existence 
> of a row.
> The vendor has this query:
> select 'Y' from <table> c where c.<col1> = a.<col1> and rownum = 1

I would look at the use of EXISTS which is designed to tell is a row 
exists or not.


Norman Dunbar
Dunbar IT Consultants Ltd

Registered address:
Thorpe House
61 Richardshaw Lane
West Yorkshire
United Kingdom
LS28 7EL

Company Number: 05132767

Other related posts: