【发布时间】:2020-06-30 14:15:51
【问题描述】:
我想创建一个删除语句,我想删除另一个选定表中的一些文章。 我创建了该语句,但是当我运行它时,它不会删除某些内容。它正在运行,但没有删除任何行。
delete from article where (client_id, art_no) in ( select art_no, client_id from art_del as A
inner join (select distinct client_id from article) as D on a.cliend_id = d.client_id
where label not in (0,-1));
where 子句中的数据看起来不错,但是当我使用 delete 执行时,它不会删除任何内容。
【问题讨论】:
-
如果您单独运行 select,它会返回任何内容吗?
-
是的,它返回我想要的.. @jarlh
-
返回多个art_no和client_id
-
如果你这样做
select from article where (client_id, art_no) in...,你会得到一些结果吗? -
@OmariVictorOmosa ,它返回 0 行
标签: sql teradata teradata-sql-assistant