Skip to content

Documentation Example for json_object doesn't work #8

Description

@mpp4manu

The example in the json_object section of the documentation (which is quite good I might add) doesn't work (at least not on MariaDB 10.3). StackOverflow has some similar posts for MySQL.

To make it work I had to use "AS" for each column. So, the example would have had to have been as follows if I were running it on my MariaDB 10.3 server (I used a different query for an existing table of my own and it worked perfectly):

select json_object(
customer_id AS 'customer_id'
, first_name AS 'first_name'
, last_name AS 'last_name'
, last_update AS 'last_update'
) as customer
from customer
where customer_id =1;

Thanks again for creating a great UDF!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions