亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

sqlserver 字符串分拆 語句

 更新時間:2009年09月21日 18:46:48   作者:  
sqlserver下字符串分拆實現(xiàn)語句,大家可以參考下。
復(fù)制代碼 代碼如下:

-->Title:生成測試數(shù)據(jù)
-->Author:wufeng4552
-->Date :2009-09-21 09:02:08
if object_id('f_split')is not null drop function f_split
go
create function f_split
(
@s varchar(8000), --待分拆的字符串
@split varchar(10) --數(shù)據(jù)分隔符
)returns table
as
return
(
select substring(@s,number,charindex(@split,@s+@split,number)-number)as col
from master..spt_values
where type='p' and number<=len(@s+'a')
and charindex(@split,@split+@s,number)=number
)
go
select * from dbo.f_split('11,2,3',',')

/*
col
----
11
2
3
(3 個資料列受到影響)
*/

相關(guān)文章

最新評論