March 8, 2006 at 3:43 pm
I have two tables TSEmployee and TSHour in SQL Server DB.
When I right click in TSHour table, I see TSEmployee table column in "objects that TSHour depends on". I understand that this table is depending on TSEmployee and that is why when ever an employee is deleted from TSEmployee all the records for this employee are deleted from TSHour. I want to keep the information in TSHour even after deleting the employee from TSEmployee. I beleive I can do that by removing this
dependency. I am new to SQL Server, please let me know how to remove this dependency.
Thanks!
March 10, 2006 at 2:40 am
Hi,
If your TSHour table depends on TSEmployee table then you should not be able to delete the employee from TSEmployee because it depends on TSHour.
If you try to delete the employee from TSEmployee it will give you error "The DELETE statement conflicted with the REFERENCE constraint...."
Thanks
Rakesh
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply