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 |
marileena
Starting Member
1 Post |
Posted - 2011-01-27 : 07:17:18
|
hii am new here in programing field. i am developing an application Employee managmnt system ... i dont know where to ask this question so place it in right forum.i have two tables EmpInfo and EmpRequests... i want to add EmpName field of EmpInfo in EmpRequest table ..so that if i remove Employee record from EmpInfo....all assosiated record in EmpRequest table delete automatically. what relationship should have btw two tables??? if forgn key relation then how to create it in Visual Studio 2008 using sql. because i have done it but giving me error while saving ...encountered conflicting error:(( em hell tensed.if ya want to b flexble..code less |
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-01-27 : 07:41:47
|
If empInfo table has a primary key then for that you should add the primary key of EmpInfo into the EmpRequests and enable the cascade delete or update over the relationship. AS the requested feature is only allowed to be in between primary - Foreign key relationship .. I dont think so that EmpName would be the primary key of EmpInfo Table. |
|
|
ahmeds08
Aged Yak Warrior
737 Posts |
Posted - 2011-02-06 : 23:34:29
|
u can create foreign key in sql itself...for syntax just goggle it. |
|
|
MathuBell
Starting Member
1 Post |
Posted - 2011-03-02 : 05:31:41
|
Nice and very informative information.generic viagra |
|
|
|
|
|