Generally XML Path in SQL is use to convert the multiple row in single row. you we can say that you can concate the multiple rows in single row for understanding the XML path function we simple take one example so first we create one table with State and city column as show in below declare @Test Table(StateName VARCHAR(20),CityName VARCHAR(20)) Insert @Test(StateName,CityName) Values ('Gujarat','Ahmedabad') ,('Gujarat','Rajkot') ,('Gujarat','Junagadh') ,('Rajasthan','Kota') ,('Rajasthan','Udaypur') ,('Rajasthan','Jaipur') ,('Maharastra','Mumbai-1') ,('Maharastra','Mumbai-2'); OUTPUT: Here you see that table result display state name with city name but I want all the city name in single column with comma separated so for that I use the XML path function in MS SQL SERVER. Syntax: <Your Select query> For XML Path (''); It converts the data in XML ...