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

What is Transaction?

2 Answers  


What is 4nf in normalization form?

0 Answers  


How to select some specific rows from a table in ms sql server?

0 Answers  


Define right outer join in sql server joins?

0 Answers  


What is instead of dml trigger?

0 Answers  






What is normalization and what are the advantages of it?

0 Answers  


Explain what is scheduled job and how to create it?

0 Answers  


Explain the concepts and capabilities of sql server?

0 Answers  


How will you fine tune a stored procedure or what are the steps that should be taken to fine tune or optimize a stored procedure?

1 Answers   Logitech, Mphasis,


What is the command dbcc checkdb used for?

0 Answers  


What are the requirements to use odbc connections in php scripts?

0 Answers  


There is a table1 with records (1,2,3,4,5,6) and table2 with records (4,5,6,7,8,9).write a query so as to get the result as 1,2,3,4,5,6,7,8,9

12 Answers   RBS,


Categories