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 |
What is the difference between the 2 operating modes of database mirroring?
1.Describe way(s) to tune the SQL table in order to optimize performance. 2. Explain SQL Injection and how can you prevent them?
What is a sql join?
How to defragment indexes with alter index ... Reorganize?
How many full-text indexes can a table have?
How can we check the sql server version?
After using delete statement in sql query to delete some records...to retrieve the deleted records we can get using rollback command but till that where it stores means particular location name i need....(after deleting and rollback )
3 Answers CarrizalSoft Technologies, iGate,
What are the different methods available under sqlcommand class to access the data?
Can you explain what is the use of custom fields in report?
Do you know what are the steps to process a single select statement?
What is difference between rownum and row_number?
How to create Clustered Primary Key to table?