Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-10-10 : 07:31:52
|
| Raghu writes "i have two table like emp, deptempid. .ename....esal....etc... are columns of emp table id is the primary key dept:deptid,dname, id .....etc ...are the columns of the deptid is the foreign key when ever insert values in to emp table the value of id also come in dept ?i requesting to help?iam doing project in c# with sqlserver" |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-10-10 : 07:36:26
|
| No, it does not. You have to make two INSERT statements.Peter LarssonHelsingborg, Sweden |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-10-10 : 07:55:26
|
| Foreign key only ensures that the value you enter exist in reference table but it does not automatically add value. You will have to explicitly do that.Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
|
|
|