前端之家收集整理的这篇文章主要介绍了
sql – 在Hive查询中的子查询源中,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我在Hive上运行
查询类似于:
SELECT *
FROM (SELECT a
FROM b
WHERE
sex = 'M'
AND degree = 'Bs'
AND age = 15
AND name LIKE 'L%'
);
错误是:
cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in subquery source
为Hive
添加子
查询的表别名是必需的.下面我使用’t1’作为别名:
SELECT *
FROM (SELECT a
FROM b
WHERE
sex = 'M'
AND degree = 'Bs'
AND age = 15
AND name LIKE 'L%'
) t1 ;
原文链接:https://www.f2er.com/mssql/76605.html