码迷,mamicode.com
首页 > 数据库 > 详细

ODPS SQL <for 数据操作语言DML>

时间:2019-04-13 19:06:25      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:other   HERE   csharp   rtc   partition   The   ber   from   distrib   

基本操作:

查询:

SELECT [ALL | DISTINCT] select_expr, select_expr, ...
FROM table_reference
[WHERE where_condition]
[GROUP BY col_list]
[ORDER BY order_condition]
[DISTRIBUTE BY distribute_condition [SORT BY sort_condition] ]
[LIMIT number] 

更新:

INSERT OVERWRITE|INTO TABLE tablename [PARTITION (partcol1=val1, partcol2=val2 ...)] [(col1,col2 ...)]
select_statement
FROM from_statement;

表关联:

join_table:
        table_reference join table_factor [join_condition]
        | table_reference {left outer|right outer|full outer|inner} join table_reference join_condition
    table_reference:
        table_factor
        | join_table
    table_factor:
        tbl_name [alias]
        | table_subquery alias
        | ( table_references )
    join_condition:
        on equality_expression ( and equality_expression )

演示内容:

使用DML:

*查询已有数据

*使用表连接查询数据

*覆盖更新

*追加更新

 

others....

ODPS SQL <for 数据操作语言DML>

标签:other   HERE   csharp   rtc   partition   The   ber   from   distrib   

原文地址:https://www.cnblogs.com/sdrbg/p/10702290.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!