Home » SQL & PL/SQL » SQL & PL/SQL » unique constraint
unique constraint [message #38392] Tue, 16 April 2002 07:59 Go to next message
Rolf
Messages: 2
Registered: April 2002
Junior Member
Hi all,

who can answer this exam-question?

Table TEST has a unique constraint on the two nullable columns a and b. How many rows can contain a='TEST' and NULL b?
A) 0
B) 1
C) Any number up to all rows -1
D) Any number up to all rows

Please explain your choice. thanx
Re: unique constraint [message #38400 is a reply to message #38392] Tue, 16 April 2002 17:35 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
There can only be 1 row with those values. A unique constraint, unlike a primary key constraint allows NULL values, but any combination of values/NULLs in the key can only appear once.
Previous Topic: Help .... !! Is it possible to delete file from Stored Procedure.
Next Topic: Urgent: Deleting using joins on 2 tables
Goto Forum:
  


Current Time: Tue Apr 23 13:38:06 CDT 2024