SQL થી JSON કન્વર્ટર

Input data
bfotool loadding
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Output data
bfotool loadding
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

એસક્યુએલ ટુ જેસન ઉદાહરણ

ઇનપુટ ડેટા

CREATE TABLE peoples(
    id INTEGER PRIMARY KEY,
    name CHAR(20),
    age CHAR(2)
);

INSERT INTO peoples VALUES (1, 'name 1', '22');
INSERT INTO peoples VALUES (2, 'name 2', '33');
INSERT INTO peoples VALUES (3, 'name 3', '44');
INSERT INTO peoples VALUES (4, 'name 4', '55');

SELECT * FROM peoples

આઉટપુટ ડેટા

[
    {
        "id": "1",
        "name": "name 1",
        "age": "22"
    },
    {
        "id": "2",
        "name": "name 2",
        "age": "33"
    },
    {
        "id": "3",
        "name": "name 3",
        "age": "44"
    },
    {
        "id": "4",
        "name": "name 4",
        "age": "55"
    }
]