hive里面select from table与from table select 这两种写法有什么区别呢?
hive里面select from table与from table select 这两种写法有什么区别呢?
都可以,不过还是第一种方法更标准一些,和标准的sql是一致的 hive官方给出的select语法树是这样的:
[WITH CommonTableExpression (, CommonTableExpression)*]
SELECT [ALL | DISTINCT] select_expr, select_expr, ...
FROM table_reference
[WHERE where_condition]
[GROUP BY col_list]
[CLUSTER BY col_list
| [DISTRIBUTE BY col_list] [SORT BY col_list]
]
[LIMIT number]