What are primary keys and foreign keys?

Answers were Sorted based on User's Feedback



What are primary keys and foreign keys?..

Answer / nevual

Primary keys are the unique identifiers for each row. They
must contain unique values and cannot be null. Due to their
importance in relational databases, Primary keys are the
most fundamental of all keys and constraints. A table can
have only one Primary key.
Foreign keys are both a method of ensuring data integrity
and a manifestation of the relationship between tables.

Is This Answer Correct ?    7 Yes 0 No

What are primary keys and foreign keys?..

Answer / sudarsan

Primary key is a unique id for each table. This prevents
duplication of records. Each table can have a single
primary key. They can be refrenced by any tables as a
foreign key.

Is This Answer Correct ?    4 Yes 0 No

What are primary keys and foreign keys?..

Answer / jai prakash chauhan

Primary keys are by default clustered index.

Is This Answer Correct ?    3 Yes 2 No

What are primary keys and foreign keys?..

Answer / hr@tgksolutions.com

• Primary Key: A unique identifier for a table’s record (e.g., id in a table).
• Foreign Key: A column in a table that refers to the primary key of another table, establishing a relationship between tables.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Do you know what is xpath?

1 Answers  


What the class forname () does?

1 Answers  


Tell me what is use of except clause? How it differs from not in clause?

1 Answers  


What is database normalization?

7 Answers   Deloitte, Digicel, JPMorgan Chase, Verifone,


What is 5nf in normalization form?

1 Answers  


What command do we use to rename a db, a table and a column?

1 Answers  


what is curser.

9 Answers  


Explain atomicity?

1 Answers  


Hi Friends, I have a table in which there are thousands of records and in city field there is NULL value for all records now i want to change that null value with distinct values in each record say delhi, bihar, agra, jaipur etc, what will be the query for that????? its not possible to update thousands of records one by one. is there any alternative ...? Plz help ... its urgent Thanx in advance

1 Answers  


What are different types of join?

1 Answers  


What is difference in performance between insert top (n) into table and using top with insert?

1 Answers  


Where can you find the error log information? : sql server database administration

1 Answers  


Categories