0

jSonColoumn - data type (TEXT)

sample rows

{"scheduledTime":"2014-01-29 19:55:00"}  
{"scheduledTime":"2014-01-29 22:55:00"}    
{"scheduledTime":"2014-01-29 15:55:00"}
{"scheduledTime":"2014-01-29 08:55:00"}

i need to sort this result with the "scheduledTime" key of the json object stored in the column "jSonColoumn". (Simply i need to order by the result based on the "scheduledTime" key of the json)

Thanks

2
  • its that realy sql? from what sql does this data come? did u try order by ? please improve your question Commented Jan 29, 2014 at 14:52
  • @Melon: I think it is just a text field. Commented Jan 29, 2014 at 14:52

1 Answer 1

2

There are some MySQL JSON functions.

Like this:

select json_extract(columnX, '{"scheduledTime"}')
Sign up to request clarification or add additional context in comments.

1 Comment

select json_extract(columnX, '$.scheduledTime')

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.