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 |
Write a query to get all details of employee who has maximum salary from employee table
What do you mean by tablesample?
please differentiate between delete and truncate?
can a database be shrunk to 0 bytes, if not, why? : Sql server administration
How to verify a login name with sqlcmd tool?
Rate yourself in .NET and SQL ?
1 Answers Cognizant, HCL, SunGard,
What is sql server profiler trace data file?
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
what is a transaction and what are acid properties? : Sql server database administration
what is differencial backup?how to work?Anybody explai it?
What is resource governor in sql server?
What is your recommendation for a query running very slow? : sql server database administration
Oracle (3253)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)