选择行更大/大于

问题描述 投票:0回答:1

我尝试将所有行获取,其中unixtimestamp包含一个在给定日期之间的键。我可以通过选择

{
    "id":"string",
    "user":int,
    "history":{
        "unixtimestamp":{
            "progress":"string",
            "editorId":int
        },
        "unixtimestamp":{
            "progress":"string",
            "editorId":int
        },
        ...
    }
}
来获得键的数组。但是我找不到解决方案如何过滤。 thanks寻求帮助!

	

JSON_KEYS(´value', '$.history')

从历史上获取钥匙。

JSON_KEYS(t.value, '$.history')
sql mysql json
1个回答
0
投票
    JSON_TABLE
  • 要转换为数字并允许过滤。
    CAST(j.timestampKey AS UNSIGNED)
  • DBFIDDLE
  • 
    
最新问题
© www.soinside.com 2019 - 2025. All rights reserved.