View previous topic :: View next topic
|
Author |
Message |
praneethgokul
New User
Joined: 06 May 2005 Posts: 20 Location: Bangalore
|
|
|
|
Hi all,
I got 2 silly doubts on primary key.
1. What happens to data when we disable primary key on data?
2. What is diference between unique key and primary key?
Thanks in advance. |
|
Back to top |
|
|
chayanath
New User
Joined: 07 Mar 2005 Posts: 6 Location: vijayawda
|
|
|
|
hello,
1. I am not sure that word disble do exists interms of a data in table
2. There can be only one primary key for a table
and multiple unique keys.
i hope this can do it for u.
bye
chayanath |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi Praneeth,
Answering Your Quetions
1.Disable the Primary key -- am Not pretty sure you can disable the primary key.
2.Difference btn Primary Key and Unique Key is
Primary Key is Unique and NotNull --The values should be unique and should not be Null.
UniqueKey --The Values should be Unique and can be null even |
|
Back to top |
|
|
jkbytes
Active User
Joined: 19 Feb 2005 Posts: 139 Location: South Africa
|
|
|
|
Sudheer wrote:
Quote: |
Primary Key is Unique and NotNull --The values should be unique and should not be Null.
UniqueKey --The Values should be Unique and can be null even |
I agree to his point but you cannot have two null records for a field defined as unique. Coz the unique constraint doesn't allow it.
Thanks & Regards,
JKBYTES |
|
Back to top |
|
|
sudheer648
New User
Joined: 23 May 2005 Posts: 97 Location: Chennai
|
|
|
|
Hi Bytes,
Only one Null is accepted not the second obviously.it will also treated as an value.
Cheers,
Sudheer |
|
Back to top |
|
|
|