我正在搜索对update/delete连接的支持hive0.14支持事务查询,比如teradata15.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)
1条答案
按热度按时间xlpyo6sf1#
你必须参考
cart
通过一种join
```DELETE album
FROM album INNER JOIN cart ON (album.id = cart.albumid)