Hello, I was wondering if anyone is a master on SQL here? I'm looking to do the following in SQL. I'm sure my syntax is wrong, so would someone know if it is possible? Basically I want to delete rows in the zp_user table if those users are not in another table. Thank you.
You can do it with a nested query as you have hinted at but with mytable.user being replaced with (select userid from mytable) Nested queries generally arent great for efficiency but it does sound like something that you wont be doing too often so wont be a big concern