Home » SQL & PL/SQL » SQL & PL/SQL » unique Constraint
unique Constraint [message #8594] Wed, 03 September 2003 04:21 Go to next message
saravanan
Messages: 70
Registered: October 2000
Member
how many Null values can accept the unique constraint column
Re: unique Constraint [message #8597 is a reply to message #8594] Wed, 03 September 2003 05:00 Go to previous message
Maaher
Messages: 7065
Registered: December 2001
Senior Member
Unlimited. NULL represents the absence of a value, not a value itself. Oracle can only evaluate values, not the absence of a value, which is why a test like 'X = NULL' will always be 'false' (condition not met).
If you'd try a query like
Select 'Check' test
  From dual
 Where NULL = NULL;
you'd get a 'no rows selected'.

That's the main reason you compare with 'IS NULL' rather than an equasion.
MHE
Previous Topic: Trigger
Next Topic: finding max date in table of numerous sames
Goto Forum:
  


Current Time: Fri Apr 19 03:06:47 CDT 2024