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 is the server name in sql server?

0 Answers  


What are the various editions of sql server 2017 that are available in the market?

0 Answers  


could you please reply for these question: 1.About Use Apply? 2.Avoid cursors - When we have a situation that we can not avoid the use of cursor than what is the alternate solution? is there anything we can use instead of cursor to perform the desired task? which optiomize the peroformance too. 3.What is computed columns? Thanks in advance. Regards, Rupesh

3 Answers  


Define self join?

0 Answers  


How to create new tables with "select ... Into" statements in ms sql server?

0 Answers  






How and why use sql server?

0 Answers  


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

0 Answers  


what is replication? where do u use Go Keyword?

1 Answers   Satyam,


How to swap the data of two columns in a table. both the columns containing varchar values.

9 Answers  


How to retrieve field values using mssql_result()?

0 Answers  


Diffrent types of function

1 Answers   Wipro,


What are the differences between local and global temporary tables?

0 Answers  


Categories