Heim  >  Fragen und Antworten  >  Hauptteil

json zu MySQL hinzugefügt

So fügen Sie neue Elemente zur JSON-Variablen in MySQL hinzu

Davon: Wert = ['123'] Mach das: Wert = ['123','456']

P粉939473759P粉939473759180 Tage vor366

Antworte allen(1)Ich werde antworten

  • P粉464088437

    P粉4640884372024-04-05 15:29:44

    JSON_ARRAY_APPEND() ; 函数

    SET @Value = '["123"]';
    SET @Value = JSON_ARRAY_APPEND(@Value, '$', '456');
    SELECT @Value;
    @Value
    ["123", "456"]

    小提琴

    Antwort
    0
  • StornierenAntwort