Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Write a query to get all details of employee who has maximum salary from employee table

8 Answers   AON, Genpact,


What do you mean by tablesample?

0 Answers  


please differentiate between delete and truncate?

0 Answers  


can a database be shrunk to 0 bytes, if not, why? : Sql server administration

0 Answers  


How to verify a login name with sqlcmd tool?

0 Answers  


Rate yourself in .NET and SQL ?

1 Answers   Cognizant, HCL, SunGard,


What is sql server profiler trace data file?

0 Answers  


you added a row to a view, but the row is not shown on the view. Explain how this can happen, and how you can remedy the situation

0 Answers  


what is a transaction and what are acid properties? : Sql server database administration

0 Answers  


what is differencial backup?how to work?Anybody explai it?

2 Answers   HCL,


What is resource governor in sql server?

0 Answers  


What is your recommendation for a query running very slow? : sql server database administration

0 Answers  


Categories