AD

Some operations on the string (instr, substr)

1, instr (source string, target string, the search location, matching the first few)
Note: The location of the string starting from 1, the search must start at 1 position, if the search position is 0, then the search result is 0, find the result is 0 for not found.
select instr ('acv', 'c', 1,1) from dual; from a start to find the location of c the first match, the result is 2

2, substr (string, intercept position, intercept length)

Note: The index is a start, if is 0 or 1
select substr ('acv', 1,1) from dual / / a
select substr ('acv', 0,1) from dual / / a

If the interception position is negative, to the left from the right number from 1, the interception order is still left to right
select substr ('acv', -1) from dual / / v
select substr ('acv', -2,1) from dual / / c
标签: match, target string, intercept, string target, source string, search location, search result, search position, dual c
分类: Database
时间: 2010-10-31

相关文章

  1. Some operations on a string (instr, substr)

    1, instr (source string, target string, the search position, the first few matches) Note: The string position ...
  2. oracle interception of the use of string function substr

    oracle, you can use the substr function is the interception of a string. Syntax: substr (string, start_positio ...
  3. instr, substr, and in, exists

    and exists in in For in a good understanding of select * from T1 where T1.a in (select T2.a from T2) " He ...
  4. string的substr问题

    有字符串area(1000),area(1001)...需要把字符串的数字串取出: 1 myArea = string("area(1000)"); myArea = myArea.substr(5, ...
  5. mysql the left, right, substr, instr string interception, the interception of decimal float

    //------------------------------------------------ ----------------- select avg (stu_oder_percent) from tb_sch ...
  6. mysql-left, right, substr, instr string interception, the interception of decimal float

    //------------------------------------------------ ----------------- select avg (stu_oder_percent) from tb_sch ...
  7. INSTR and SUBSTR in Oracle usage

    In the usage of Oracle INSTR: INSTR method format INSTR (source string, to find the string, starting from the ...
  8. mysql string operations

    mysql-left, right, substr, instr string interception, the interception of decimal float 2007-07-29 14:10 mysql ...
  9. ORACLE string operations (transfer)

    ORACLE string operations 1 connection string SQL> select 'abc' | | 'def' from dual; 'ABC' | ------ abcdef 2 ...
  10. Does not appear to delete all the replies show replies show star returns to score back ORACLE PL / SQL string functions. Mathematical functions. Date function

    ORACLE PL / SQL string functions, math functions, date functions - String functions] [ - String interception s ...
  11. Oracle interception string

    About Oracle which required a number of small functions: A. a database table may contain a string "+" ...
  12. correlation function mysql string handling

    CONCAT(str1,str2,...) Back to the link from the parameter string. If any parameter is NULL, return NULL. Can h ...
  13. mysql string processing functions related to

    CONCAT(str1,str2,...) Return link from the argument string. If any parameter is NULL, return NULL. Can have mo ...
  14. mysql string handling functions

    CONCAT(str1,str2,...) Return link from the argument string. If any parameter is NULL, return NULL. Can have mo ...
  15. mysql commonly used string functions

    Keywords: mysql terminal; string functions Reference URL: http://blog.sina.com.cn/s/blog_45b088420100bst4.html ...
  16. (R) DB2 9 in the character-based string functions

    http://www.ibm.com/developerworks/cn/data/library/techarticles/dm-0705nair/index.html?S_TACT=105AGX52&S_CM ...
  17. Javascript String 字符串操作包

    提供一个 JS String 包,包含了一些常用的对字符串操作的函数,详细的请看源码及演示 核心代码: /** * jscript.string package * This package contains utili ...
  18. Step-by-step learning Ruby (8): string expression

    Ruby, the built-in many ways the operation of the string the following, we take a look at some of the most imp ...
  19. JS received a string of letters most frequently

    <script type="text/javascript"> <!-- var str ="adadfdfseffserfefsefseeffffftsdg"; ...