Is deleting connected records possible?

Alles, was MariaDB und 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,
Posts: 46
Joined: 08. March 2009 06:10
Location: France & Canada
Operating System: Win 7 Family Prem Ed (64 bit?)

Return to MariaDB - MySQL

Who is online

Users browsing this forum: No registered users and 3 guests