I have a situation where I have a two field table, id and value. I want to delete a row if there is a value with the same key and a particular second value.
delete val 1 from the table when val2 exists with the same key.
I tried this (and a bunch of other combinations) and none seem to work
delete from table t1 where t1.val = 'val1' and t1.id in (select id from table t2 where t2.val = 'val2')
This format actually works for the select statement, i.e. replace delete with select *.