JSON -> / ->> disparity; is this supposed to happen?
Posted by: A B
Date: September 30, 2017 08:20PM

DROP TABLE IF EXISTS `testtable`;
CREATE TABLE `testtable` (`field` TEXT);
INSERT INTO `testtable` VALUES ('{"order":1}'),('{"order":11}'),('{"order":2}');
SELECT MAX(field->'$.order'), MAX(field->>'$.order') FROM testtable;

the answer is "11, 2", which I don ot understand at all.

Options: ReplyQuote


Subject
Views
Written By
Posted
JSON -> / ->> disparity; is this supposed to happen?
849
A B
September 30, 2017 08:20PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.