select colA, dump(colA), ascii(colA),colb from kkss order by colA desc
create table kkss(colA char(10),colAA varchar(10),colB number);
insert into kkss values('a','a',1);
insert into kkss values('bb','bb',2);
insert into kkss values('5','5',5);
insert into kkss values('44','44',44);
insert into kkss values('33','33',33);
create table LCK
(name varchar2(60),
sex varchar2(10),
old number (20),
comments varchar2(30))
PCTFREE 99 PCTUSED 1;
DECLARE n number;
t_name varchar2(60);
t_sex varchar2(20);
t_comments varchar2(30);
BEGIN
FOR I IN 1..16000 LOOP
t_name:='1234567890,1234567890,1234567890,1234567890,1234567890,'||to_char(I);
t_sex:='mail'||to_char(I);
t_comments:='verygood'||to_char(I);
n:=n+1;
execute immediate 'INSERT INTO LCK (name,sex,old,comments) VALUES(:v1,:v2,:v3,:v4)' using t_name,t_sex,I,t_comments ;
commit;
END LOOP;
END;
create table LCK
(name varchar2(60),
sex varchar2(10),
old number (20),
comments varchar2(30))
PARTITION BY RANGE (old)
(
PARTITION p1 VALUES LESS THAN (1000),
PARTITION p2 VALUES LESS THAN (2000),
PARTITION p3 VALUES LESS THAN (3000),
PARTITION p4 VALUES LESS THAN (4000),
PARTITION p5 VALUES LESS THAN (5000),
PARTITION p6 VALUES LESS THAN (6000),
PARTITION p7 VALUES LESS THAN (7000),
PARTITION p8 VALUES LESS THAN (8000),
PARTITION p9 VALUES LESS THAN (9000),
PARTITION p10 VALUES LESS THAN (10000),
PARTITION p11 VALUES LESS THAN (MAXVALUE))
高效SQL
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 《SQL优化最佳实践:构建高效率Oracle数据库的方法与技巧》【摘要 书评 试读】- 京东图书 http://...