What are the different keys in Sql server

Posted by Rajeshk under Sql Server on 11/28/2012 | Points: 10 | Views : 1495 | Status : [Member] | Replies : 2
hi,

Can anyone tell me the differnt keys available for the sqlserver and its usage

Thanks&Regards
rajeshkommireddy@gmail.com



Responses

Posted by: Wadhwanisanju on: 11/28/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,

There are no of keys which describe below :

Primary Key -- A unique key which can not be null.
Unique Key -- A unique key which can be null.
Foreign Key -- A ref key of Primary key in other table.
Composite Key -- Combination two keys which make them a single key as Primary key.

Mark as Answer if you got your ans.

Thanks

Happy Coding !!!

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sriramnandha on: 5/11/2013 [Member] Starter | Points: 25

Up
0
Down
Hi,

There are difference number of Keys Available in sql server
1) Primary Key- Restrict Duplicate values and null values.
2) Unique Key : Restrict Duplicate Values and Allow null null values.
3) Foreign Key: Parent Table Child Table Relation Ship.
4) Composite Key: Combination of Two Keys make primary Key.

Hope this will help .....

sriram

Rajeshk, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response