You would write a select query from your table as you normally would, but then specify XML path with the appropriate node and root names - for example like shown below, where I am showing only 3 columns. You will need to add all the other columns to the select query.SELECT
id,
url,
desc
FROM
YourTable
FOR XML PATH('item'), ROOT('Merchant');