我正在搜索对更新/删除Hive 0.14上的联接的支持,它支持事务查询,例如teradata 15.00支持SQL查询,例如
DELETE FROM employee
WHERE employee.deptno = department.deptno
AND department.location = 'NYC';
DELETE employee
FROM department AS d, employee
WHERE employee.dept_no = d.dept_no
AND salary_pool < 50000;
UPDATE e
FROM employee AS e, department AS d
SET salary = salary * 1.05
WHERE e.emp_no = d.emp_no;
在引用 hive 中的第二张表时,我得到
delete from album where album.id = cart.albumid;
出现错误:
FAILED: SemanticException [Error 10004]: Line 1:35 Invalid table alias or column reference 'cart': (possible column names are: id, name)
最佳答案
您必须通过一种cart
引用join
表
DELETE album
FROM album INNER JOIN cart ON (album.id = cart.albumid)
在您提供的示例中,表通过
,
连接关于sql - 加入Apache Hive 0.14更新和删除查询,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/27402576/