06-28-2007 3:48 PM
06-28-2007 3:50 PM
Hi,
Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesnt allow NULLs, but unique key allows one NULL only.
Hope it was useful.
Thanks,
Sandeep.
06-28-2007 3:54 PM
Hi,
With respect to functionality both are same.
But in ABAP we only have Primary key for the Database tables declared in the Data Dictionary.
Unique is generally is the term used with declaring key's for internal tables.
Both primary and Unique keys can identify one record of a table.
Regards,
Sesh
06-29-2007 10:42 AM
Hi,
Primary Key and Unique is also same but only one difference,
1. We can create Foreign key with reference of Primary key, but we could not create Foreign key with reference of Unique.
IF USEFULL REWARD
06-29-2007 10:52 AM
hi
P.K is used to fetch a record uniquely.
will not accept null character.
a table can have only one primary key.
Unique key is used to fetch a record selectively.
it accepts null char for one row..
except null char operations are same.
reward if useful.
06-29-2007 10:55 AM
hi.
primary key doesnt allow NULLs, but unique key allows one NULL only.
We can create Foreign key with reference of Primary key, but we could not create Foreign key with reference of Unique.
Reward all helpfull answers.
Regards.
Jay