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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How to drop the second table automaticlly

Author  Topic 

jpham
Starting Member

19 Posts

Posted - 2006-09-28 : 19:08:00
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

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2006-09-28 : 19:47:48
If you are on 2005, you can use a DDL trigger to do this.

SqlSpec - a fast, cheap, and comprehensive data dictionary generator for SQL Server 2000 and 2005 - http://www.elsasoft.org
Go to Top of Page
   

- Advertisement -