sql,怎样遍历字符串
摘要:
declare @idx int, @str nvarchar(1000)set @str = '我的字符串'set @idx = 1while @idx <= len(@str)begin PRINT substring(@str, @idx, 1)-- 取得@idx所在的这个字符 set @idx = @idx + 1end-----------------------------------------------------------------------结果:我的字符串 阅读全文
posted @ 2012-05-28 17:07 zhuhai 阅读(276) 评论(0) 推荐(0)
浙公网安备 33010602011771号