Below query will generate xml for employee records
SELECT [EMP_ID]
,[FIRST_NAME]
,[LAST_NAME]
,[DEPARTMENT_ID]
,[SALARY]
FROM [ABCD].[dbo].[Employee]
FOR XML RAW('Employee'), ROOT('Employees'), ELEMENTS XSINIL;
SELECT [EMP_ID]
,[FIRST_NAME]
,[LAST_NAME]
,[DEPARTMENT_ID]
,[SALARY]
FROM [ABCD].[dbo].[Employee]
FOR XML RAW('Employee'), ROOT('Employees'), ELEMENTS XSINIL;
No comments:
Post a Comment