Oracle分区之四:分区维护和管理

  次阅读 作者:智能小宝 来源:互联网 2016-01-28 13:19 我要评论(0)

一,分区表的相关实验

创建一个列表分区表

create table t3(id number,city varchar2(10))

partition by list(city)

(

partition p1 values ('SH','JS','ZJ') ,

partition p2 values ('BJ','TJ','HB') ,

partition p3 values ('GZ','SZ') ,

partition p_others values (default)

);

create or replace procedure proc1

as

begin

for i in 1..1000

loop

execute immediate

'INSERT INTO T3 values(:x,:y)' USING i,'SH';

end loop;

end;

/

exec proc1

create or replace procedure proc1

as

begin

for i in 1001..2000

loop

execute immediate

'INSERT INTO T3 values(:x,:y)' USING i,'JS';

end loop;

end;

/

exec proc1

create or replace procedure proc1

as

begin

for i in 2001..3000

loop

execute immediate

'INSERT INTO T3 values(:x,:y)' USING i,'ZJ';

end loop;

end;

/

exec proc1

create or replace procedure proc1

as

begin

for i in 3001..4000

loop

execute immediate

'INSERT INTO T3 values(:x,:y)' USING i,'BJ';

end loop;

end;

/

exec proc1

create or replace procedure proc1

as

begin

for i in 4001..5000

loop

execute immediate

'INSERT INTO T3 values(:x,:y)' USING i,'TJ';

end loop;

end;

/

exec proc1

create or replace procedure proc1

as

begin

for i in 5001..6000

本站文章信息来源于网络以及网友投稿,本站只负责对文章进行整理、排版、编辑,是出于传递更多信息之目的,并不意味着赞同其观点或证实其内容的真实性。如果您有什么意见或建议,请联系QQ28-1688-302!

人工智能实验室