IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

diff between primary key and unique index


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rajesh822
Currently Banned

New User


Joined: 22 Sep 2005
Posts: 5

PostPosted: Thu Sep 22, 2005 7:38 pm
Reply with quote

what is diff between primary key and unique index?

Rajesh
Back to top
View user's profile Send private message
ikumar

New User


Joined: 02 Aug 2005
Posts: 81

PostPosted: Thu Sep 22, 2005 8:06 pm
Reply with quote

Primary Key: a relational database constraint. Primary key consists of one or more columns that uniquely identify a row in the table. For a normalized relation, there is one designated primary key.

Unique index: a physical object that stores only unique values. There can be one or more unique indexes on a table.
Back to top
View user's profile Send private message
harinatha

New User


Joined: 24 Jul 2005
Posts: 28

PostPosted: Sun Sep 25, 2005 5:19 pm
Reply with quote

Hi,

Here one more point is added.

Unique key can have one null value(only one), but not in Primary key.

Thanks & Regards,
Hari.
Back to top
View user's profile Send private message
khamarutheen

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Thu Nov 03, 2005 10:02 am
Reply with quote

hi frnd,
the primary key is a key which holds only the unique value and the primary key is set active if the unique index is created where the physical storage is created for the unique values.
Back to top
View user's profile Send private message
Kavitha Palani

New User


Joined: 16 Nov 2005
Posts: 8

PostPosted: Tue Nov 22, 2005 5:19 pm
Reply with quote

Primary Key: a relational database constraint. Primary key consists of one or more columns that uniquely identify a row in the table. For a normalized relation, there is one designated primary key.
Unique index: a physical object that stores only unique values. There can be one or more unique indexes on a table.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Query on edit primary command CLIST & REXX 5
No new posts Query on edit primary command CLIST & REXX 1
No new posts Cobol file using index COBOL Programming 2
No new posts Cobol prog to put an indicator on the... JCL & VSAM 1
No new posts DL/I status code AK for GU call using... IMS DB/DC 1
Search our Forums:

Back to Top