Is deleting connected records possible?

Alles, was MySQL betrifft, kann hier besprochen werden.

Is deleting connected records possible?

Postby mickeymouse » 26. March 2012 21:17

I have TableA with 'userid' and 'code'
I have TableB with 'userid' and other fields (but not the 'code' field)

I want to delete TableA & TableB records WHERE A.userid = B.userid and A.code="del".

Is it possible to do this in one MySQL statement and how? (I can't find the answer in MySQL documentation.)

Thank you,
Mickey
mickeymouse
 
Posts: 36
Joined: 08. March 2009 06:10
Location: France & Canada
XAMPP Version: 5.6.3
Operating System: Win 7 Family Prem Ed (64 bit?)

Return to MySQL

Who is online

Users browsing this forum: No registered users and 4 guests