Question: how to convert sql server table data to json?
Answer: There are two ways that relational results can be converted into JSON, namely, the AUTO and PATH options. This is the simplest way to convert relational data into a JSON format as all that you have to do is to add FOR JSON AUTO clause at the end of your SELECT statement.