Hi All, I have two table like TABLEA and TABLEB and whenever the user drops the TABLEA I would like the TABLEB is automaticlly drop as well. Do I need to use the triggers and what should 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
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.