Assume,there are three tables in a database, Can i have
both primary key and foreign key for each table in the same
database?

Answers were Sorted based on User's Feedback



Assume,there are three tables in a database, Can i have both primary key and foreign key for each ..

Answer / madhu

We can create 3 tables with PK and FK but can not insert
rows. Try it.

Is This Answer Correct ?    5 Yes 0 No

Assume,there are three tables in a database, Can i have both primary key and foreign key for each ..

Answer / siva

Hi,

You can place the foreign key column in each table to allow
nulls. And insert values.

But I am still worried a lot about deletion of the values
from these tables ?

Plz post your comments

Regards,
Subbu

Is This Answer Correct ?    0 Yes 0 No

Assume,there are three tables in a database, Can i have both primary key and foreign key for each ..

Answer / guest

Nope.

Is This Answer Correct ?    1 Yes 1 No

Assume,there are three tables in a database, Can i have both primary key and foreign key for each ..

Answer / subbu

Yes we can have that ! Let me expalin with this small
example.

(PK)ProjectID (FK)ClientID -- Project Table
(PK)ClientID (FK)ProjectManagerID -- ClientTable
(PK)Employee (FK)ProjetcID -- Employee Table

Check This In this example I am having 3 tables and each
table have PK and FK.

Is This Answer Correct ?    1 Yes 5 No

Post New Answer

More SQL Server Interview Questions

Would it be a good idea to create an index on a table that always contains 10 records? Why or why not?

3 Answers  


What is table join?

0 Answers  


What is difference between aggregate and analytic function?

0 Answers  


Explain steps of normalization?

0 Answers  


how to get the salary in descending order with out using the keyword desc in sql

5 Answers   Ramco,






What are magic tables in sql server?

0 Answers  


Tell me what is sql profiler?

0 Answers  


Define the term DML, DDL and DTL?

1 Answers  


How can we check the sql server version?

0 Answers  


What are translations and its use? : sql server analysis services, ssas

0 Answers  


How can u get the number of pupils connecting the database?

1 Answers   Cap Gemini,


Differencr Between DELETE and TRUNCATE?

3 Answers   ADP,


Categories