C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Forums » .NET » SQL Server »

Primary key for multiple column


Posted Date: 03 Nov 2009      Posted By: navin kumar      Member Level: Silver     Points: 1   Responses: 4



hi every one

can we set a primary key for multiple column.. if so how
and give me the descriptor of candidate key, alternate key and union key, compost key and all...
and give me about the in-detail description of the constraint keys
thanks in advance..


thanks in advance....





Responses

Author: Anil Kumar Pandey    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

hi,

there can be one primary key for a table, if you want to reference it for other table make it as Foreign key..

Thanks & Regards
Anil Kumar Pandey



Author: atulpatel    03 Nov 2009Member Level: GoldRating: 2 out of 52 out of 5     Points: 2

hi,

you can get definitions of the all the keys on following link
http://faq.programmerworld.net/database/faq-ms-sql-server.html


Thanks,
Atul



Author: ABitSmart    03 Nov 2009Member Level: DiamondRating: 2 out of 52 out of 5     Points: 2

A primary key with multiple columns is called a candidate key.

Kind regards,
ABitSmart
DNS Web-master, DNS MVM
My blog
Thoughts.exe



Author: Shameer    03 Nov 2009Member Level: SilverRating: 2 out of 52 out of 5     Points: 2

Primary Key:

The PRIMARY KEY constraint uniquely identifies each record in a database table.Primary keys must contain unique values.A primary key column cannot contain NULL values.Each table should have a primary key, and each table can have only one primary key

Foreign Key:

A FOREIGN KEY in one table points to a PRIMARY KEY in another table.

Union:

The UNION operator is used to combine the result-set of two or more SELECT statements.



Post Reply
You must Sign In to post a response.
Next : How to find out the tables that have foreign keys?
Previous : Couldn't install sql server 2005 database engine in vista premium
Return to Discussion Forum
Post New Message
Category: SQL Server

Related Messages



dotNet Slackers

About Us    Contact Us    Privacy Policy    Terms Of Use