时间:2021-07-01 10:21:17 帮助过:2人阅读
USE [xxx] GO /****** Object: UserDefinedFunction [dbo].[GetInPara] Script Date: 2019/9/26 11:06:28 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER function [dbo].[GetInPara](@c varchar(2000),@split varchar(2)) returns @t table(col varchar(20)) as begin while(charindex(@split,@c)<>0) begin insert @t(col) values (substring(@c,1,charindex(@split,@c)-1)) set @c = stuff(@c,1,charindex(@split,@c),‘‘) end insert @t(col) values (@c) return end
SQL 以逗号分隔查询;调用自定义函数
标签:index from style rom sele begin color rip bst