Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to improve this query?
Tom Miskiewicz wrote:
> Hi!
>
> Thanks for your reply.
>
>
>>If all you want to test for is not null and your column is indexed then
>>should use >>select count(*) >>from table >>where col is not null;
or
SELECT Count('I like the color blue')
FROM table;
BTW ... try this test:
SELECT COUNT(*)
FROM all_tables
WHERE NULL = NULL;
followed by
SELECT COUNT(*)
FROM all_tables
WHERE NULL <> NULL;
That should prove the point Sybrand and Chris made.
-- Daniel Morgan http://www.outreach.washington.edu/ext/certificates/oad/oad_crs.asp http://www.outreach.washington.edu/ext/certificates/aoa/aoa_crs.asp damorgan_at_x.washington.edu (replace 'x' with a 'u' to reply)Received on Mon Nov 24 2003 - 08:54:42 CST
![]() |
![]() |