DrSchool Learn coding, fast.
EN AR BN CS DE EL Search

JSON Serialize — Example 153

Quick explanation + ready code for: JSON Serialize.

SQL JSON Serialize Back to examples
Back to language
Syntax: JSON Serialize in SQL. ID: #153

Code

SELECT JSON_OBJECT('id', 10, 'ok', TRUE) AS json;

Notes

You can copy this snippet and adapt it. For advanced, add real-world inputs, edge cases, and tests.