41
hash 分区CREATE TABLE t_parti_8 PARTITION BY HASH(s_id) PARTITIONS 8 AS SELECT * FROM t_parti;生成explain执行计划SQL> @?D:\app\zKF77467\product\11.1.0\db_1\RDBMS\ADMIN\utlxplan.sql &n...
40
oracle 字符集 (1).数据库服务器字符集select * from nls_database_parameters来源于props$,是表示数据库的字符集。 (2).客户端字符集环境select * from nls_instance_parameters其来源于v$parameter,表示客...
39
3。配置嵌入式PL/SQL网关@apex_epg_config D:\appalter user anonymous account unlock;alter user hr account unlock;alter user hr identified by orcl4.核实oracle DB http服务器的端口select dbms_xdb.gethttppo...
38
上面所示为存储过程相应代码,你可以通过如下方式进行测试:进入pl/sql, 执行 文件->新建->程序窗口->空白,拷贝以上各段代码,到pl/sql空白窗口中,安F8执行编译。再 执行 文件->新建->命令窗口 进入命令窗口 执行...
37
3、While循环:create or replace procedure proc_test_while isi number;begini:=0;while i<5 loopi:=i+1;dbms_output.put_line(i);end loop;end proc_test_while;——————————————————–俺是分割...
36
主要有以下五种循环:Exit When、Loop、While、For(普通循环)、For(游标循环),下面举例一一说明(均为存储过程)。1、Exit When循环:create or replace procedure proc_test_exit_when isi number;begini:=0;LOOPExi...
35
-- list分区create table list_par_city (sid number,s_num number,city varchar2(20))partition by list(city)(partition p1 values ('wuhan'),partition p2 values ('beijing'),partition p3 values ('shanghai'),...
34
-- 游标declare PAR_ID tb_area_code.par_area_id%type; AREA_NAME tb_area_code.area_name%type; cursor c_1 is select t.par_area_id,t.area_name from ...
33
异常1.预定义异常2.非预定义异常3.自定义异常declare name emp.ename%type;begin select ename into name from emp where deptno=10; exception when no_data_found then ...
32
异常1.预定义异常2.非预定义异常3.自定义异常declare name emp.ename%type;begin select ename into name from emp where deptno=10; exception when no_data_found then ...
31
查询中间几条数据SELECT add_lst_code,add_lst_name FROM ( SELECT ROW_NUMBER() OVER (ORDER BY add_lst_code) RNO,add_lst_code,add_lst_name FROM tb_lst_type)WHERE RNO <= 5ORDER BY add_lst...
30
SQL> select owner,index_name,table_name,status from dba_indexes where INDEX_NAME='IX_PDBA_GLOBAL';owner index_name &n...
29
(2)全局索引 Oracle 会自动维护分区索引,对于全局索引,如果在对分区表操作时,没有指定update index,则会导致全局索引失效,需要重建。SQL> select owner,index_nam...
28
只要索引的引导列包含分区键,就是有前缀的分区索引。4.3 索引重建问题(1)分区索引 对于分区索引,不能整体进行重建,只能对单个分区进行重建。语法如下: ...
27
--这个是有前缀的分区索引。 SQL> create index i_time_global on PDBA(id) global 2 partition by range(time) 3 (partition p1 values less than (TO_DATE('2010-12-1', 'YYYY-MM-DD')),&...
26
示例2:全局分区索引,只支持Range 分区和Hash 分区:(1)创建2个测试分区表:sql> create table pdba (id number, time date) partition by range (time) 2 ( 3 partition p1 values less...
25
注意:Oracle只支持2中类型的全局分区索引: range partitioned 和 Hash Partitioned.官网的说明如下:Global Partitioned Indexes ...
24
SQL> create index ix_custaddr_local_areacode on custaddr(areacode) local;索引已创建。验证2个索引的类型:SQL> select index_name,table_name,partitioning_type,locality,ALIGNMENT from user_part_indexes wh...
23
第 2 行出现错误:ORA-14038: GLOBAL 分区索引必须加上前缀4.1 Local 本地索引 对于local索引,当表的分区发生变化时,索引的维护由Oracle自动进行。注意事项:(1) 局部...
22
(1)有前缀的分区索引指包含了分区键,并且将其作为引导列的索引。如:create index i_id_global on PDBA(id) global --引导列 2 partition by range(id) --分区键 3 (partiti...