数据库技术_Orcale技术(0001)_字符串处理(截取文件名或扩展名)


基础技术:

截取文件名:

SELECT SUBSTR('pop.kid.orc.txt', 1, INSTR('pop.kid.orc.txt', '.', -1) - 1) AS FILE_NAME
  FROM DUAL;

截取扩展名:

SELECT SUBSTR('pop.kid.orc.txt',
              INSTR('pop.kid.orc.txt', '.', -1) + 1,
              LENGTH('pop.kid.orc.txt')) AS FILE_NAME
  FROM DUAL;


点击进入ooppookid的博客

你可能感兴趣的:(java,oracle,sql,技术,字符串处理)