Primary Key Creation [message #212369] |
Thu, 04 January 2007 23:54 |
moorthygs
Messages: 3 Registered: January 2007 Location: Chennai
|
Junior Member |
|
|
Hi All,
I have one query for creating Primary Key & Unique Key.
1) Is there possible to create the primary after loading data.
For example, In EMP table i have inserted 10 rows with duplicates(EMP_ID). After inserting the datas i want to create the primary for EMP_ID. Now EMP_ID duplicate values are enforcing or not?
2) I create one unique constraint for one column. Unique accepts null value. But its not accept duplicate values.
My question is Shall give more than one null value into unique constraint column.
Cheers,
Moorthy.GS
|
|
|
Re: Primary Key Creation [message #212392 is a reply to message #212369] |
Fri, 05 January 2007 02:15 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
1) If there are duplicate values in your Emp_Id column then you will be unable to create a primary key constraint, as it will check for uniqueness when you create it.
2) You can have multiple null values in a column with a unique constraint.
|
|
|