Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

delete from multiple tables

Status
Not open for further replies.

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?
 
what version of mysql are you on? because the multi-table DELETE syntax is supported only in 4.0+

rudy
SQL Consulting
 
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
SQL Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top