C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Communities   Interview   Jobs   Projects   Offshore Development    
Silverlight Tutorials | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Revenue Sharing |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...

New Feature: Community Sites: Create your own .NET community website and start earning from Google AdSense ! It's Free !




unique key


Posted Date: 28 Aug 2008      Total Responses: 3

Posted By: narendra       Member Level: Silver     Points: 1


hi friends plz help me

How many primary key and how many unique keys can we create for a table,why?




Responses

Author: UltimateRengan    28 Aug 2008Member Level: DiamondRating:     Points: 4
hi,
Primary key and unique are Entity integrity constraints.unique key can be null but primariy key cant be null.
primariy key can be refrenced to other table as FK.We can declare only one primary key in a table but a table can have multiple unique key.

i hope this may help u


Author: D.Jeya kumar(JK)    28 Aug 2008Member Level: DiamondRating:     Points: 5
Hi,


One Primary key can created for a table and Many number of
Unique key can be created on a table

Difference between this 2 is Primary will not allow Null values and duplicate values where as unique key will allow null values.

Primary key is automatically created when a clustered index is created

Primary key is used to identify a row uniquly so primary key
should be created one for a table

Regards
JK



Author: http://venkattechnicalblog.blogspot.com/    31 Aug 2008Member Level: DiamondRating:     Points: 2
1 - primary key
Unique key... as much as the number of columns.

Regards,
Venkatesan Prabu .J
http://venkattechnicalblog.blogspot.com/


Post Reply
You must Sign In to post a response.
Next : candidate Key
Previous : Identity
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers   BizTalk Adaptors    Web Design

fax server

Contact Us    Privacy Policy    Terms Of Use