如何在Hive、MySQL、Oracle中分别添加自增序号
最近公司业务涉及到了在相应库中添加自增序号这种操作,闲暇之余,整理如下,仅供参考~ 一、Hive 1、首先在Hive中建立一个测试表 create table xzw(id int, name string) clustered by (id) into 2 buckets stored as orc TBLPROPERTIES('transactional'='true'); 2、向测试表中插入几条数据 insert into table xzw values (1,'row1'),(1,'row2'),(1,'row3'); 3、使用row_n
下载地址
用户评论