How to convert data to json format in SQL Server 2008?

后端 未结 3 599
抹茶落季
抹茶落季 2021-01-12 14:26

I am using SQL Server 2008 and want to convert table data into json format. Can I convert it directly through firing query?

3条回答
  •  伪装坚强ぢ
    2021-01-12 14:45

    I have created a stored procedure that can take your table and output JSON. You can find it at

    • GitHub - SQLTableOrViewToJSON

    Once you run the stored procedure, you can output your table by making a call like the following:

    EXEC SQLTableOrViewToJSON 'MyTable', 'C:\WhereIStowMyJSON\'
    

提交回复
热议问题