odps数据库(—)

1.show  p  from  2019-9-12  to 2019-9-12  2000;显示所有odps这个时间段的命令

2.展示各个表的分区
show  tables   in  martdata_phq_dev   like '*ztt';

3.删除分区表的分区:
alter  table  martdata_phq.risk_index_base_bigdata  if   exists     partition(tx_date=20190524)

4.删除没有分区的表:
drop   table   if   exists    tablename

5.向表中插入数据:
insert   into | overwrite  table  tablename  [partition(partcol1=var1,partcol2=var2...)]  into向表的分区中追加数据,overwrite则会在向表或者分区中插入数据前清空表中原有数据

6.向动态分区中插入数值,在分区中指定一个分区列名,但不给出值,相应的在select子句中的对应列来提供分区的值,因为有些分区是不能固定的

insert  overwrite  table   tablename   partition(partcol1…)  select  partcol1… from_statement;

7.杀死进程

ctrl+c  ->  kill  进程号

8.更改表注释:
alter  table  table_name  set  comment  'tb comment'  

9.修改列分区注释:
alter  table   table_name   change  column   col_name  comment  'comment';


10

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值