如何在与其他表联接时以固定值更新vertica中的表?

Arp*_*ava 3 vertica

我在MySQL中有以下查询:

UPDATE table1 AS a
JOIN table2  AS b ON a.code=b.code
AND b.rating < 3
SET a.Status = 'Delisted';
Run Code Online (Sandbox Code Playgroud)

在Vertica中使用此命令时,出现错误:““ JOIN”处或附近的语法错误”有人可以帮忙。提前致谢

小智 5

试试这个(没有JOIN,Vertica足够聪明):

update table1 as a set status = 'delisted'
  from table2 as b
  where a.code = b.code and b.rating < 3;
Run Code Online (Sandbox Code Playgroud)

欲了解更多信息,请点击这里