把用户名连成字符串的sql语句.
DECLARE @Name NVARCHAR(MAX)='' SELECT @Name =@Name+ CASE(LEN(@Name)) WHEN 0 THEN '' ELSE ',' END +FirstName+LastName FROM dbo.Sys_Users PRINT @Name
DECLARE @Name NVARCHAR(MAX)='' SELECT @Name =@Name+ CASE(LEN(@Name)) WHEN 0 THEN '' ELSE ',' END +FirstName+LastName FROM dbo.Sys_Users PRINT @Name