Nov 5, 2004 #1 axman505 Technical User Jun 20, 2001 489 US I am having trouble trying to figure out a delete query to work accross multiple tables. right now, i have something like this: Code: DELETE from ad_bill_info as b, ad_cc as c USING b,c where b.cc_id = c.id and b.id = 2 Any suggestions?
I am having trouble trying to figure out a delete query to work accross multiple tables. right now, i have something like this: Code: DELETE from ad_bill_info as b, ad_cc as c USING b,c where b.cc_id = c.id and b.id = 2 Any suggestions?
Nov 5, 2004 #2 r937 Technical User Jun 30, 2002 8,847 CA what version of mysql are you on? because the multi-table DELETE syntax is supported only in 4.0+ rudy http://r937.com/ SQL Consulting Upvote 0 Downvote
what version of mysql are you on? because the multi-table DELETE syntax is supported only in 4.0+ rudy http://r937.com/ SQL Consulting
Nov 5, 2004 Thread starter #3 axman505 Technical User Jun 20, 2001 489 US i am running 4.0.22 Upvote 0 Downvote
Nov 5, 2004 #4 r937 Technical User Jun 30, 2002 8,847 CA did you try it without aliases? DELETE from ad_bill_info, ad_cc USING ad_bill_info, ad_cc where ad_bill_info.cc_id = ad_cc.id and ad_bill_info.id = 2 rudy http://r937.com/ SQL Consulting Upvote 0 Downvote
did you try it without aliases? DELETE from ad_bill_info, ad_cc USING ad_bill_info, ad_cc where ad_bill_info.cc_id = ad_cc.id and ad_bill_info.id = 2 rudy http://r937.com/ SQL Consulting
Nov 5, 2004 Thread starter #5 axman505 Technical User Jun 20, 2001 489 US thanks, that seemed to do it. Upvote 0 Downvote