代码如下: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE function [dbo].[SplitString] ( Input nvarchar(max), Separator nvarchar(max)=’,’, RemoveEmptyEntries bit=1 ) returns TABLE table ( [Id] int identity(1,1), [Value] nvarchar(max) ) as begin d