I've got 2 tables:
id | name | mail | pass | salt
id | uid | title | text | timestamp
Now I want to delete all rows of entries with an uid, which doesn't exist in user-table
(deleted users)
I think this might work like this:
DELETE entries FROM user, entries WHERE [What comes here? I don't know :(]
DELETE FROM entries WHERE uid NOT IN (SELECT DISTINCT id FROM user);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With