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 stored by the master?

718


What is the function of sql server agent windows service?

749


Explain subquery and state its properties?

706


Difference between DELETE and TRUNCATE?

790


what is a default tcp/ip socket assigned for sql server? : Sql server database administration

757






How to provide values to user defined function parameters?

759


Explain the phases a transaction has to undergo?

734


What does it mean to invest in the index?

696


What is an index in sql?

729


What are ddl (data definition language) statements for tables in ms sql server?

751


What are entities and relationships?

739


How can I track the changes or identify the latest insert-update-delete from a table?

717


How do you create a data source?

650


Why does a sql statement work correctly outside of a user-defined function, but incorrectly inside it?

654


How to how to convert numeric expression data types using the convert() function??

722