.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

Explain composite key with an example.

Posted By: Ramesh P     Posted Date: October 29, 2010    Points:2   Category :Sql Server
Explain composite key with an example.

Author: Deco             
Posted Date: October 29, 2010     Points: 5   

Composite key is nothing but the combination of two or more keys to represent the unique rows.

assume that you have FirstName, LastName and DateOfBirth columns in a User table

You can combine all the three column to set a composite key. it will create uniqueness. :-)

Author: sriram             
Posted Date: October 27, 2011     Points: 20   

create table employee(empid int ,empsalid int,empname varchar(90) composite key(empid,empsalid))

hope this wil help

let me know any Questions


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend