Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL - Any data in this column?

Re: SQL - Any data in this column?

From: elziko <elziko_at_NOTSPAMMINGyahoo.co.uk>
Date: Fri, 24 Jan 2003 12:56:02 -0000
Message-ID: <3e3137ff$0$2580$afc38c87@news.easynet.co.uk>


Well, if your both interested I tried both suggestions in my loop that I needed to speed up and comapared to my original method:

My Orginal Method: 1
Steve E & Helen: 0.3

So theres not much between you both but compared to mine I'm pretty happy. I'm gonna go for steves since I suspect that as the number of rows in my table increases it might be significantly faster??

Cheers for the help,

elziko

"elziko" <elziko_at_NOTSPAMMINGyahoo.co.uk> wrote in message news:3e2feee3$0$2562$afc38c87_at_news.easynet.co.uk...
> I want to check a ceratin column to see if it has any data for a certain
ID.
> So I'm using this SQL:
>
> SELECT count(mycolumn)
> FROM mytable
> WHERE myid = 10
> AND mycolumn IS NOT NULL
>
> If that returns a number greater than zero I know there is data in the
> column. However, for my situation this is too slow. Is there a faster way?
>
> Cheers,
>
> elziko
>
>
Received on Fri Jan 24 2003 - 06:56:02 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US