SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 How to drop the second table automaticlly
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jpham
Starting Member

USA
19 Posts

Posted - 09/28/2006 :  19:08:00  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
2886 Posts

Posted - 09/28/2006 :  19:47:48  Show Profile  Visit jezemine's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.25 seconds. Powered By: Snitz Forums 2000