摘要:1.先制作需要执行的Sql文件listCMD 中输入【dir E:\FolderName>E:\ExcuteSqlList.txt 】2.根据ExcuteSqlList.txt 中的文件名list制作执行文件【Excute.sql】。3.Excute.sql [文件里的内容] @@sql1.sql ...
阅读全文
摘要:OLB 问题ORA-22992:没法使用从远程表选择的LOB定位器Createglobaltemporarytabletemponcommitpreserverowsasselect*fromJJR_TJJR_CYZGXX@DEVDBLINK Insertintotestselect*fromtem...
阅读全文
摘要:SQL> conn / as sysdbaConnected.SQL> show parameter memoryNAME TYPE VALUE------------------------------------ -----------------------------------------hi_shared_memory_address integer 0memory_max_target big integer 1584Mmemory_target big integer 1584Mshared_memory_address integer 0SQL> alter
阅读全文
摘要:Table Space Queryselect SEGMENT_NAME,bytes/1024/1024,a.* from dba_segments aUNDO Table Space Size Full数据库重启SQL> shutdown abortORACLE 例程已经关闭。SQL> quit从...
阅读全文
摘要:select * from tablewhere col like '%\_'escape'\'
阅读全文
摘要:INSTR(string,subString,position,ocurrence)查找字符串位置解释: string:字符串 subString:要查找的子字符串 position:查找的开始位置 ocurrence:字符串中第几次出现的子字符串Ex:INSTR('ABCD','C', 1, 1)SelectINSTR('ABCD','C', 1, 1)FROM DUAL;Result:INSTR('ABCD','C',1,1)--------------------- 31 row select
阅读全文
摘要:SELECT * FROM XXXwhere column1**************************************
阅读全文
摘要:1.查看global_name的设置SQL> show parametersglobal_name;NAME TYPE VALUE------------------------------------ ----------- ------------------------------global_names boolean FALSE默认情况下就是false2.查看GLOBAL_NAMESQL> SELECT *FROM GLOBAL_NAME;GLOBAL_NAME--------------------------------------------------------
阅读全文
摘要:/* Formatted on 2013/9/7 20:45:28 (QP5 v5.185.11230.41888) */ SELECT MIN (DECODE (TO_CHAR (DAYS, 'D'), 1, TO_CHAR (DAYS, 'FMDD'))) MON, MIN (DECODE (TO_CHAR (DAYS, 'D'), 2, TO_CHAR (DAYS, 'FMDD'))) TUE, MIN (DECODE (TO_CHAR (DAYS, 'D'), 3, TO_CHAR (DAYS, '
阅读全文
摘要:ref:http://blog.chinaunix.net/uid-21592001-id-3082675.html【转】plsql developer使用技巧Oracle数据库相信已成为很多企业构建自身关键业务的重要后台支撑,也是众多开发人员常常采用的后台。但Oracle自己提供的一套客户端工具不是很好用,极大的影响了工作效率,幸好现在有了PL/SQL Developer这款工具。现在越来越多的开发人员成了它的忠实fans。本文就是立足于实用的基础上,总结了了改工具的常用技巧:1.记住登陆密码为了工作方便希望PL/SQL Developer记住登录Oracle的用户名和密码;设置方法:PL/
阅读全文
摘要:10G+ suportRegexp_likeRegexp_instrRegexp_substrRegexp_replace/*ORACLE中的支持正则表达式的函数主要有下面四个:1,REGEXP_LIKE :与LIKE的功能相似2,REGEXP_INSTR :与INSTR的功能相似3,REGEXP_SUBSTR :与SUBSTR的功能相似4,REGEXP_REPLACE :与REPLACE的功能相似它们在用法上与Oracle SQL 函数LIKE、INSTR、SUBSTR 和REPLACE 用法相同,但是它们使用POSIX 正则表达式代替了老的百分号(%)和通配符(_)字符。POSIX 正则表
阅读全文
摘要:环境变量中找到 Orale_Home 位置。1. ORACLE_HOME\oc4j\j2ee\OC4J_DB_Console_[计算机名 or IP]_[服务名]修改计算机名2. ORACLE_HOME\[计算机名or IP]_[服务名]修改计算机名3.ORACLE_HOME\[计算机名or IP]_[服务名]\sysman\configproperties 文件中,修改 计算机名 Or IP。4. ORACLE_HOME\NETWORK\ADMINlistener.ora, tnsnames.ora 文件也要修改。
阅读全文
摘要:Ref:http://blog.csdn.net/yhmhappy2006/article/details/5552574一 概念 游标是SQL的一个内存工作区,由系统或用户以变量的形式定义。游标的作用就是用于临时存储从数据库中提取的数据块。在某些情况下,需要把数据从存放在磁盘的表中调到计算机内存中进行处理,最后将处理结果显示出来或最终写回数据库。这样数据处理的速度才会提高,否则频繁的磁盘数据交换会降低效率。 二 类型 Cursor类型包含三种: 隐式Cursor,显式Cursor和Ref Cursor(动态Cursor)。 1. 隐式Cursor: 1).对于Select …INTO…语句.
阅读全文
摘要:-- create objectscreate or replace type obj_type1 as object ( c1 int, c2 int);/create or replace type obj_tbl_type1 as table of obj_type1;/+++++++++++++++++++++++++++++++++++++++++create or replace function func1return obj_tbl_type1pipelinedis v_obj obj_type1;begin for idx in 1 .. 100 loop v_obj :=
阅读全文
摘要:Ref:http://www.adp-gmbh.ch/ora/sql/table_cast.htmlcreate or replace type date_obj as object (dt date)/create or replace type date_table as table of date_obj/create or replace function date_range(from_dt in date, to_dt in date) return date_table as a_date_table date_table := date_table(); cur...
阅读全文
摘要://deletedelete from table1 a where exists (select 1 from table2 b where a.col1 = b.col1)//insertinsert into table1 ( col1, col2)select 'a', 'b' from dualwhere not exists (select 1 from table2 where index = ?)//updateupdate /*+ bypass_ujvc */ (select col1 from table1 a, table2b where
阅读全文
摘要:/* Formatted on 2012-02-07 오후 4:51:00 (QP5 v5.149.1003.31008) */SELECT * FROM ( SELECT a.lot_id, a.shift_start_timekey, a.event_name, a.old_oper_code, a.oper_code, '-', LAG (old_oper_code, 2) OVER (ORDER BY lot_id, event_timekey) PREVIOUS_2, LAG (old_oper_code, 1) OVER (ORDER BY lot_id, even
阅读全文
摘要:select * from v$nls_parameters
阅读全文
摘要:查看用户select * from dba_users 查看用户表select * from user_tables查看字段select *fromuser_tab_columns/* Formatted on 2012-01-20 오전 10:32:56 (QP5 v5.149.1003.3100...
阅读全文