SQL Server SQL字符串拼接
DECLARE @STR VARCHAR(8000) set @STR=char(39)
SELECT @STR = ISNULL(@STR,'')+Flowdirection+char(39)+','+char(39) FROM W_inf_IQCDepartmentSet_Details
SELECT @STR SELECT SUBSTRING(@STR,0,len(@STR)-1)
--拼接字符串 单引号用 char(39) char(37)代替%