What are different types of Keys? Please explain all the
keys with a suitable example.

Answer Posted / avishek patra

There are mainly two types of keys are available in SQL server
1. PK
2. FK

1.PK-- In a Table the unique key(with no repetation and does
nota take null value) is called Primary Key
2.FK-- Foreign Key when that PK refers to another table then
its called as foreign Key

Is This Answer Correct ?    39 Yes 42 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is save transaction and save point?

615


What is a cursor, index in sql?

565


Explain intellisense for query editing

559


what is bit datatype? : Sql server database administration

499


Does the unique constraint create an index?

555






Explain what are sparse columns?

560


Is it possible to import data directly from t-sql commands without using sql server integration services? If so, what are the commands?

842


What are key constraints?

507


What is the purpose of optimization?

534


What are the steps you must follow to hide sql server instances?

533


Explain Reporting Life Cycle?

90


What are the different authentication modes in sql server? How can it be changed?

563


How to create a large table with random data for index testing in ms sql server?

530


How to use group functions in the select clause in ms sql server?

529


What are the types of user defined functions in sql server?

491