unique constraint [message #373701] |
Wed, 02 May 2001 07:23 |
adelia
Messages: 45 Registered: April 2001
|
Member |
|
|
Why I use a unique constraint instead of using Primary key constraint , to create a table ???
|
|
|
Re: unique constraint [message #373703 is a reply to message #373701] |
Wed, 02 May 2001 07:35 |
siddharth
Messages: 16 Registered: May 2001
|
Junior Member |
|
|
The diffrence between a unique constraint and a primary key constraint is that unique constraint allows a null value in one row of the table if null is allowed for that column.
A column with primary key cannot contain a null value.
HTH
Siddharth
|
|
|
Re: unique constraint [message #373708 is a reply to message #373703] |
Wed, 02 May 2001 08:25 |
jayaram
Messages: 9 Registered: May 2001
|
Junior Member |
|
|
Its not just one row with null column, you can have many rows with null column when , unique constraint is assigned to column.
no two nulls are same, NUll <> NULL( <> - not equal to)
|
|
|
Re: unique constraint [message #373709 is a reply to message #373703] |
Wed, 02 May 2001 08:26 |
jayaram
Messages: 9 Registered: May 2001
|
Junior Member |
|
|
Its not just one row with null column, you can have many rows with null column when , unique constraint is assigned to column.
Two nulls in a column are not same, NUll <> NULL( <> - not equal to)
|
|
|
|
|