SQL Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseSQL Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 5th, 2004, 03:39 AM
hello_anoob hello_anoob is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2004
Posts: 1 hello_anoob User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Post Help needed (Delete Query)

how can i delete all the records from a table
that have relation with the current deleted record .

table : Network
fields type
Net_id numeric
Descn varchar
parent_id numeric

net_id and parent_id are self joined

net_id descn parent_id
1 cccccccccc 0
2 cdfdfdgfdfgdf 1
3 fgdsgfgfdg 2
4 rrrrrrrrttrt 2

when i delete the record having net_id=1,i want to delete the records having net_id 2,3,4

Reply With Quote
  #2  
Old January 21st, 2004, 07:36 PM
unatratnag unatratnag is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Posts: 312 unatratnag User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 m 6 sec
Reputation Power: 6
Send a message via AIM to unatratnag
PHP Code:
 when i delete the record having net_id=1,i want to delete the records having net_id 2,3,

so when you want to delete 1 you actually want to delete every record that is not 1?

Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseSQL Development > Help needed (Delete Query)


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT