Attempting to delete a list of id’s generated by a sub-select in a single statement. Is this possible? I’ve been trying the following:
[edit] corrected query
DELETE from store
WHERE id in ( SELECT store.id
FROM storeInfo
JOIN store ON storeInfo.store_id = store.id
WHERE storeInfo.type = 17 )
But this is incorrect syntax … not sure how to build this properly.
1 Answer