Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation Example for json_object doesn't work #8

Open
mpp4manu opened this issue Jul 23, 2016 · 0 comments
Open

Documentation Example for json_object doesn't work #8

mpp4manu opened this issue Jul 23, 2016 · 0 comments

Comments

@mpp4manu
Copy link

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant