Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Variable_name IS NULL and variable_name=NULL...
Message
Information générale
Forum:
Oracle
Catégorie:
PL/SQL
Titre:
Variable_name IS NULL and variable_name=NULL...
Divers
Thread ID:
00644536
Message ID:
00644536
Vues:
102
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform