Sql Delete语句正在工作,但不删除行

Sql Delete语句正在工作,但不删除行,sql,teradata,teradata-sql-assistant,Sql,Teradata,Teradata Sql Assistant,我想做一个delete语句,删除另一个选定表中的某些项目。 我创建了该语句,但当我运行它时,它不会删除某些内容。它正在运行,但未删除任何行 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_i

我想做一个delete语句,删除另一个选定表中的某些项目。 我创建了该语句,但当我运行它时,它不会删除某些内容。它正在运行,但未删除任何行

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执行时,它不会删除某些内容。

where子句是这样的:

where (client_id, art_no)
所以这对夫妇有第一个客户id,然后是艺术编号 但在子查询中,顺序不同:

select art_no, client_id
改为:

delete from article  
where (client_id, art_no) in ( 
  select client_id, art_no
  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)
);

如果运行select单机版,它是否返回任何内容?是的,它返回我想要的内容@jarlhIt返回多个art_no和client_id如果您确实从文章中选择了client_id、art_no in。。。你得到一些结果了吗?@omarivectoromosa,它返回0行,并且在where/select中是相同的列顺序,where\u no,client\u id,select art\u no,client\u cd。。。仍然有同样的问题你在问题中发布的代码是错误的。如果您仍然无法得到想要的结果,这意味着要么代码的逻辑错误,要么实际数据与您想象的不同。无论如何,没有人能猜出问题出在哪里。