1:实现indexOf功能,.从第1个字符开始,搜索第1次出现子串的位置
      
        select
      
       instr(
      
        '
      
      
        ->Oracle instr用法
      
      
        '
      
      ,
      
        '
      
      
        Oracle instr用法
      
      
        '
      
      ,
      
        1
      
      ,
      
        1
      
      ) 
      
        as
      
       i 
      
        from
      
       dual;  
    
  
      
        select
      
       instr(
      
        '
      
      
        oracle
      
      
        '
      
      ,
      
        '
      
      
        or
      
      
        '
      
      ) as i 
      
        from
      
       dual;
    
  2:实现like功能
      instr(name,
      
        '
      
      
        aa’)>0 相当于like
instr(name,
      
      
        '
      
      aa’)
      
        =
      
      
        0
      
       相当于not 
      
        like
      
    
  


 
					 
					