Tuesday, 17 September 2013

SQL CONCATE MULTIPAL ROW

DECLARE @CITY NVARCHAR(MAX)
SELECT @CITY = COALESCE(@CITY+',','')+CITY_NAME FROM MST_CITY
SELECT @CITY


-- RESULT

KOLHAPUR,SANGALI,MUMBAI,PUNE

No comments:

Post a Comment

Note: only a member of this blog may post a comment.