我正在寻找对更新/删除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)
答案 0 :(得分:0)
您必须通过一种cart
join
表
DELETE album
FROM album INNER JOIN cart ON (album.id = cart.albumid)
在您提供的示例中,表格通过,