0

I'm trying to create add a json object to a number of records where the value is a UUID. poking at it, i can limit the issue to this:

select json_object("uuid", select UUID())

even a basic

select json_object("uuid", select "1") doesn't seem to work

in both instances i get a syntax error on the subselect. does json_object not support having one of the parameters be the result of a mysql method? and/or is there a better way for me to do this? this is in MySql 5.7.12

1 Answer 1

2

You don't need to nest SELECT. Just call the function.

SELECT JSON_OBJECT("uuid", UUID());
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.