摘要: SQL> SELECT * FROM dba_directories ;OWN DIRECTORY_NAME DIRECTORY_PATH------- ---------------------- ---------------SYS DPUMPDIR ... 阅读全文
posted @ 2013-12-25 15:16 czcb 阅读(5485) 评论(0) 推荐(0) 编辑
摘要: SQL> select * from v$mystat where rownum select count(*), USERNAME from v$session group by username; COUNT(*) USERNAME---------- --------------------... 阅读全文
posted @ 2013-12-25 13:52 czcb 阅读(250) 评论(0) 推荐(0) 编辑
摘要: SQL> select * from v$mystat where rownum create index acct_dtl_af_idx4 on T_PM_ACCT_DTL_AF (acct_flag,data_date,acct_no_pk,cur_code) ; 2 ;SQL> select ... 阅读全文
posted @ 2013-12-25 13:04 czcb 阅读(288) 评论(0) 推荐(0) 编辑
摘要: SQL> select * from v$mystat where rownum select sid, SQL_ADDRESS,SQL_HASH_VALUE,SQL_ID from v$session where si 2 ; SID SQL_ADDR SQL_HASH_VALUE SQL_ID-... 阅读全文
posted @ 2013-12-25 12:40 czcb 阅读(400) 评论(0) 推荐(0) 编辑
摘要: SQL> create table a1(id int,name varchar2(10));Table created.SQL> create table a2(id int,name varchar2(10));Table created.SQL> insert into a1 values(1... 阅读全文
posted @ 2013-12-25 09:46 czcb 阅读(265) 评论(0) 推荐(0) 编辑
摘要: SQL> set serveroutput on SQL> declare name varchar2(10);begin select ename into name from emp where empno = &no; dbms_output.put_line(name);EXCEPTION ... 阅读全文
posted @ 2013-12-24 20:51 czcb 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1.create or replace procedure test_prc(p_data_dt in date) IS e_name emp.ename%type; begin select ename into e_name from emp where hiredate =p_data_dt;... 阅读全文
posted @ 2013-12-24 17:31 czcb 阅读(304) 评论(0) 推荐(0) 编辑
摘要: explain plan for select a.* from fxqd_list_20131115_new_100 a where (acct_no, oper_no, seqno, trans_amt) not in (select acct_no, oper_no, se... 阅读全文
posted @ 2013-12-24 11:29 czcb 阅读(287) 评论(0) 推荐(0) 编辑
摘要: begin for iin1 ..1000000loop executeimmediate'insert into p1 values(' || i || ',' || i ||')'; commit; endloop;end;可以看到动态使用拼接的是使用的常值begin for iin1 ..10... 阅读全文
posted @ 2013-12-24 09:58 czcb 阅读(256) 评论(0) 推荐(0) 编辑
摘要: DECLARE V_COUNTER NUMBER; begin V_COUNTER := 0; for i in 1 .. 1000022 loop insert into p1 values(i, 'a' || i); V_COUNTER := V_COUNTER + 1; IF... 阅读全文
posted @ 2013-12-23 16:08 czcb 阅读(292) 评论(0) 推荐(0) 编辑