1:准备工作
create临时表test_no_1
Create table test_no_1
(
test_not varchar2(40)
)tablespace tsind04
一般新建varchar2类型即可
临时表批量插入数据
declare
i Integer;
begin
i :=0;
while I<100000 loop
insert into test_no_1 values(LPAD(i,6,0));
i:=i+1;
commit;
end loop;
end;
根据目标表位数决定你values中的值是几位,使用函数LPAD(i,6,0),6位数字,从000000到999999
2 、oracle建表
获取oracle 建表语句
如果数据库中已存在该表,可跳过建表操作,没有建表按下列方法操作。建表语句可以在hue中复制到本地,自行修改一下。
hive建表语句
Create table’testtable_wangzheshuo’(
‘xiaoritian’decimal(4,0)comment ‘小日天’,
’choulei’ string comment’丑磊’,
’choukan’string comment’丑侃’)
Comment ‘cnta???????