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
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 |
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 |
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 |
Difference between report and query parameter. Why do we need different type of parameter?
Why do we partition data?
What are some of the pros and cons of not dropping the sql server builtinadministrators group? : sql server security
Suppose we have a table "MyTable" containing 10 rows, what query should be executed to update the odd rows "Salary" as 9000?
What is system stored procedures?
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?
what is difference between view and Dip.
What is a sql join?
What are the advantages of log shipping?
1)what is the difference between Reinitializing a Subscription and synchronization the subscription? 2)when to use reinitializing ? 3)when to use synchronization? 4)when adding table or deleting a table what to do?(reinz.. or syn) 5)when adding a column what to do?
Do you know sql server 2008 introduces automatic auditing?
between cast and convert which function would you prefer and why?