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 |
jpham
Starting Member
19 Posts |
Posted - 2006-09-28 : 19:05:50
|
Hi All,I have two table like TABLEA and TABLEB and whenever the user drops the TABLEA I wouldlike the TABLEB is automaticlly drop as well. Do I need to use the triggers and whatshould I use to add the logic in for whenever the user issues the command to drop the TABLEA the TABLEB will be dropped too.Thanks,JP |
|
snSQL
Master Smack Fu Yak Hacker
1837 Posts |
Posted - 2006-09-28 : 19:47:25
|
On SQL Server 2000 you cannot create triggers for DDL statements like dropping a table (you can do that on SQL Server 2005).Users really shouldn't be dropping tables, but without knowing more about your specific case I'll assume you have good reason for doing it.Is this just for random tables or for specific situations - you should be able to create a stored procedure that drops both tables so that the user application just calls the stored procedure. |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|