• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Primary - Unique

 
Niyas Ahmed Sheikh
Ranch Hand
Posts: 129
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Whether Primary key is differ from Unique Key?? Whether both are same or different
[ September 09, 2005: Message edited by: Niyas Ahmed Sheikh ]
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Niyas Ahmed Sheikh:
Whether Primary key is differ from Unique Key?? Whether both are same or different

[ September 09, 2005: Message edited by: Niyas Ahmed Sheikh ]


unique key can have one null value
primary key cant have any null value
 
Sunil Kumar Gupta
Ranch Hand
Posts: 824
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Both PRIMARY KEY constraint and UNIQUE constraint uses to enforce Entity integrity (defines a row as a unique entity for a particular table), but primary keys do not allow null values.


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic