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

Home -> Community -> Usenet -> c.d.o.server -> Use of NVL()

Use of NVL()

From: Andy Rigby <andy_at_softap.co.uk>
Date: 5 Feb 2002 08:06:13 -0800
Message-ID: <56c32d01.0202050806.13288eea@posting.google.com>


I need to treat NULLs as empty fields in several places in my database app, and I am considering using the NVL() function to achieve this, eg:

select * from fred order by nvl(surname,' ')

or

select * from fred where nvl(surname,' ') < 'Smith'

Is there likely to be a big performance problem from doing this? NVL() is a function so perhaps I will need to create function based indexes to avoid speed problems?

Or is there a configurable parameter somewhere that will treat NULLs as if they were empty fields, something like SQL Server's 'set ANSI NULLs' thing??

Thanks

Andy Received on Tue Feb 05 2002 - 10:06:13 CST

Original text of this message

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