# Return results in json

> The following works for MS SQL Server: Result:

- Canonical: https://preview.arshadmehmood.com/today-i-learned/sql/return-results-in-json/
- Section: sql
- Author: Arshad Mehmood

The following works for `MS SQL Server`:

```sql
SELECT *
FROM Table 
where id = 1
FOR JSON AUTO, Without_Array_Wrapper;
```
Result:
```json
{"id":1,"name":"test"}
```

