Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Variable_name IS NULL and variable_name=NULL...
Message
General information
Forum:
Oracle
Category:
PL/SQL
Title:
Variable_name IS NULL and variable_name=NULL...
Miscellaneous
Thread ID:
00644536
Message ID:
00644536
Views:
101
What is the difference between using IS NULL and =NULL?

Running the following SQL Select against two different servers and getting different results:
SELECT * ;
  FROM recur_tran_test ;
  WHERE (week_end_first <= CTOD('04/26/2002') OR week_end_first=NULL) ;
  AND (week_end_last >= CTOD('04/26/2002') OR week_end_last=NULL)
Running the following SQL Select returns the same and CORRECT results on both servers:
SELECT * ;
  FROM recur_tran_test ;
  WHERE (week_end_first <= CTOD('04/26/2002') OR week_end_first IS NULL) ;
  AND (week_end_last >= CTOD('04/26/2002') OR week_end_last IS NULL)
Curious how Oracle evaluates each...? Obviously differently.

Thanks,
Will
Heavy Metal Pedal - click with care
Next
Reply
Map
View

Click here to load this message in the networking platform