I need to delete a specific record from a database table, but the table itself does not have a primary key. Therefore, the condition depends on another table. So what is the right way to do this?
delete from table_1
where exists
(select distinct tb.*
from table_1 tb, table_2 tb_2, table_3 tb_3
where tb1.col = tb2.col
and tb3.col = tb2.col
and tb3.col_2= 10)
Is the right way to do this? Suppose table_1 has 4 columns, and the first two columns should be criteria for deletion.
source
share