---
title: "DB2 substr posstr"
author: "lu_tan"
date: "2014-07-23T09:05:02Z"
tags: []
categories: ["数据库"]
slug: "db2-substr-posstr"
draft: false
lastmod: "2014-07-16T11:34:11Z"
id: 2092672
url: "https://lu-tan.iteye.com/blog/2092672"
---

select substr(column,posstr(column,'cc'),10) 
from table 

posstr(column,'cc'):相当于java indexOf 
substr:截取函数