unique constraint [message #38392] |
Tue, 16 April 2002 07:59 |
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 |
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.
|
|
|