SQL 截取字符

 

select SUBSTRING('123,abcdefg',charindex(',','123,abcdefg',0)+1,LEN('123,abcdefg')-charindex(',','123,abcdefg',0))

 

select SUBSTRING('123,abcdefg',0,charindex(',','123,abcdefg',0))

posted @ 2016-08-01 17:41  Mr.Jiang.K  阅读(146)  评论(0编辑  收藏  举报