Home  >  Article  >  Database  >  用來比較兩個字符串從第幾個位置開始不相同

用來比較兩個字符串從第幾個位置開始不相同

WBOY
WBOYOriginal
2016-06-07 14:54:471149browse

适用於Oracle資料庫的SQL Oracle SQL 字符串 select min(level) from dual where nvl(substr('字串1',level,1),' ')nvl(substr('字串2',level,1),' ') connect by level=200

适用於Oracle資料庫的SQL
Oracle SQL 字符串
select min(level) 
  from dual 
 where nvl(substr('字串1',level,1),' ')<>nvl(substr('字串2',level,1),' ') 
connect by level<=200
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn