D
D
dienerie2020-09-29 16:44:42
SQL
dienerie, 2020-09-29 16:44:42

How to get json output from sql cells?

How can I get from certain columns, view get json

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vilinyh, 2020-09-29
@vilinyh

- MySQL - json_object/json_array,
- MS SQL Server - SELECT [...] FOR JSON
- PostgreSQL - json_build_object/json_agg
- for any RDBMS without JSON support - by normal concatenation.
Or post-processing the values ​​selected by the query in any language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question