我需要从数据库表中删除一些特定记录,但是该表本身没有主键。因此,条件取决于其他表。那么正确的方法是什么?
这样做是正确的吗?假设table_1有4列,前两列应该是要删除的标准。
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)
这样做是正确的吗?假设table_1有4列,前两列应该是要删除的标准。
table_1
中的所有行。 - Shannon Severance