What is Primary key and foreign key? Give an example

Answers were Sorted based on User's Feedback



What is Primary key and foreign key? Give an example..

Answer / vipin

Primary key which enforce the uniqueness in each row og table .
Foreign key win which the existing value in table must be there in other table .
diffrence is that PK does not allow Null Values anf FK allow null values

Is This Answer Correct ?    17 Yes 2 No

What is Primary key and foreign key? Give an example..

Answer / brajesh kumar srivastava

Primary key enforce uniqueness of column and deny to allow
null values to this column and enforce referential data
integrity constraint to other table column which is call
foreign key.
Foreign key column may contain null value

Is This Answer Correct ?    4 Yes 1 No

What is Primary key and foreign key? Give an example..

Answer / aaaaaaaaaaaaa

Primary key is a primary key that is an attribute.

Is This Answer Correct ?    4 Yes 4 No

What is Primary key and foreign key? Give an example..

Answer / alquama rizvi

MS-Access requires a special way of recognising every record of a table. For this you have to set or make a primary key. If you do not do so, MS-Access does this itself by adding a new field , serving as the primary key. A table may have only one primary key, although it may have more than one fields.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What does it mean to normalize a database and why would you do it?

1 Answers  


What is isnull() operator?

1 Answers  


What are different replication agents and what's their purpose? : sql server replication

1 Answers  


What is SCOPE_IDENTITY() in sql

4 Answers   Cap Gemini,


What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting are possible?

1 Answers  


How can I change procedure name in sql server?

1 Answers  


What are the differences between left join and inner join in sql server?

1 Answers  


What are the kinds of subquery?

0 Answers  


What is cdc in sql server?

1 Answers  


What are different types of statements that are supported by sql?

1 Answers  


Write a program to fetch first 10 records from a file?

1 Answers   Amdocs,


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

1 Answers  


Categories