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 |
Once setting replication, is it potential to own a publisher as sixty four bit sql server and distributor or subscribers as a thirty two bit sql server?
How to change a login name in ms sql server?
List out the differences between global and local temp tables in sql server?
How to convert a numeric expression from one data type to another?
What do you know about system database? : SQL Server Architecture
What is the diff between Dynamic queries and static queries
1 Answers CGG, ICS Integrated Computer Solutions,
What is isnull() operator?
Write the queries for commands like Create Table, Delete table, Drop Table etc.
0 Answers HPCL, Hughes Systique Corporation,
As a part of your job, what are the DBCC commands that you commonly use for database maintenance?
What are the advantages of using views. Why do we need views when we have SPs?
What are the five major components of a dbms?
What is the difference between value type and reference type?
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)