Home » SQL & PL/SQL » SQL & PL/SQL » Not like Operator
Not like Operator [message #19221] Tue, 05 March 2002 18:33 Go to next message
Kashi Ram
Messages: 2
Registered: November 2001
Junior Member
Sir
Why does the not like operator retrieve null cases i.e. if a particular column contains
say 'Y','N',null values the query with the condition that the column not like 'Y' does not retrieve null cases What actually happens in the not like camparison with null values.Kindly throw light on this
Thanks in advance

Kashi Ram
Re: Not like Operator [message #19229 is a reply to message #19221] Wed, 06 March 2002 04:47 Go to previous messageGo to next message
pratap kumar tripathy
Messages: 660
Registered: January 2002
Senior Member
NULL means it is value is not known or not specified.

comparision of null with any value returns null.

null is neither equal to TRUE or FALSE.

when u say "not like Y" and it compare with the null , it returns null and it is not TRUE. so it does not return that row.

Hope this helps!!!
Re: Not like Operator [message #19239 is a reply to message #19221] Wed, 06 March 2002 10:12 Go to previous message
sfhollands
Messages: 15
Registered: October 2001
Junior Member
Any comparison with a null value returns a null.
To check for null values, use the IS NULL or IS NOT NULL condition.
Previous Topic: illegal use of LONG datatype
Next Topic: Formatting query for report
Goto Forum:
  


Current Time: Tue Apr 23 13:37:23 CDT 2024