这个创建视图中的问题是什么

时间:2016-02-23 17:55:44

标签: sql hive

CREATE VIEW TRIPS AS 
(SELECT * 
FROM bike_trips201402 UNION 
SELECT * FROM 
bike_trips201408 UNION 
SELECT * FROM bike_trips2015);

当我在Hadoop的Hive编辑器中运行上面的内容时,它会给出ParseException

1 个答案:

答案 0 :(得分:0)

CREATE VIEW TRIPS AS 
SELECT * 
FROM bike_trips201402 
UNION ALL 
SELECT * FROM 
bike_trips201408 
UNION ALL 
SELECT * FROM bike_trips2015;

您需要将所有关键字视为保留关键字..