oracle instr
对于instr函数,我们经常这样使用:从一个字符串中查找指定子串的位置。例
如:
SQL> select
instr('yuechaotianyuechao','ao') position from dual;
POSITION
----------
6
从字符串'yuechaotianyuechao'的第一个位置开始,向后查找第一个出现子串'ao'出现的位置。
其实instr共有4个参数,格式为“instr(string, substring, position,
occurrence)”。可实现子串的如下搜索:
1.从指定位置开始搜索子串
2.指定搜索第几次出现的子串的位置
3.从后向前搜索
--1.从第7个字符开始搜索
SQL> select
instr('yuechaotianyuechao','ao', 7) position from dual;
POSITION
----------
17
--2.从第1个字符开始,搜索第2次出现子串的位置
SQL> select
instr('yuechaotianyuechao','ao', 1, 2) position from dual;
POSITION
----------
17
--3.从倒数第1个字符开始,搜索第1次出现子串的位置
SQL> select
instr('yuechaotianyuechao','ao', -1, 1) position from dual;
POSITION
----------
17
--3.从倒数第1个字符开始,搜索第2次出现子串的位置
SQL> select
instr('yuechaotianyuechao','ao', -1, 2) position from dual;
POSITION
----------
6
相关文档:
SQLPlus是oracle提供的一个命令行执行的工具
SQLPlus中用两种命令:
sqlplus:以命令行的方式进入数据库连接
sqlplusw:以窗口的形式启动命令行工具 注:主机字符串,输入数据库名称
&n ......
There are lots of problems with Oracle DATE & TIMESTAMP and their
counterpart Java classes since they do not directly compare. DATE fields
in Oracle will give date & time where a ......
以下是Oracle JDBC官方文档的说法:
也就是随便翻译一下就理解了。
JDBC Thin for All Platforms
classes12.jar (1,600,090 bytes) - for use with JDK 1.2 and JDK 1.3
在低级JDK版本1.2与1.3中使用的驱动,虽然实际上在1.4,1.5中使用大部分情况也是OK的
classes12_g.jar (2,044,594 bytes) - same as classes12.j ......
表空间:
Oracle的UNDOTBS01.DBF文件太大的解决办法
1、.禁止undo tablespace自动增长
alter database datafile 'full_path\undotbs01.dbf' autoextend off;
2.-- 创建一个新的小空间的undo tablespace
create undo tablespace undotBS2 datafile ......
网上有很多资料,也是参考eygle的文档。
OS : Redhat AS 4 U5
DB : Oracle 10.2.0.3
1.修改jdk 下面的字体。
[oracle@rac2 db_1]$ cd $ORACLE_HOME/jdk/jre/lib/
[oracle@rac2 lib]$ mv font.properties font.properties_bak
[oracle@rac2 lib]$
[oracle@rac2 lib]$ cp font.properties.zh_CN.Redhat font.propertie ......