I have a table (EMP) I know that using the COALESCE function we can get the values of any column in this way
EMP
COALESCE
23,23,45,34 SELECT
Isnull Function will also give us the same result
DECLARE @List VARCHAR(8000) SELECT @List = ISNULL(@List + ',', '') + CAST(OfferID AS VARCHAR) FROM Emp WHERE EmpID = 23 SELECT @List