桦山涧

桦山涧
Asp.net ---->知识改变命运!
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2012年11月28日

摘要: declare @str nvarchar(50);set @str='462,464,2';select @str as '字符串'select len(@str) as '字符长度'select charindex(',',@str,1) as '第一个逗号的索引值'select LEFT(@str,charindex(',',@str,1)-1) as '第一个值'select SUBSTRING(@str,charindex(',',@str,1)+1,len 阅读全文

posted @ 2012-11-28 14:05 桦林 阅读(28710) 评论(1) 推荐(1) 编辑