SQL中对列取别名,可如下应用:
SELECT user_type type FROM s_auction_auctions;
但Hive解析上述语句时,会提示:
FAILED: Parse Error: line 1:7 cannot recognize input 'user_type' in select expression
此时,应改为:
SELECT user_type AS type FROM s_auction_auctions;
sql中起别名与hive中的区别
最新推荐文章于 2022-11-11 14:35:15 发布