Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/mysql/72.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MySQL bigInt vs JSON模式整数_Mysql_Json_Jsonschema - Fatal编程技术网

MySQL bigInt vs JSON模式整数

MySQL bigInt vs JSON模式整数,mysql,json,jsonschema,Mysql,Json,Jsonschema,想询问整数的json模式限制吗 如果我们将此设置为模式 { "data" : { "type" : "object", "properties":{ "code": {"type":"integer"} }, "required":["code"], "additionalProperties" : false

想询问整数的json模式限制吗

如果我们将此设置为模式

{
    "data" : {
            "type" : "object",
            "properties":{
                "code":         {"type":"integer"}
            },
            "required":["code"],
            "additionalProperties" : false      
        }
}
架构上代码的限制是多少位


我应该在列类型上添加什么?是int,smallint,bigint吗?多久?它是bigInt(32)还是什么?

JSON模式
整数是
JSON
整数,而
JSON
整数的大小不受限制

因此,您没有通过选择类型
integer
来限制大小


相反,您可以使用关键字将边界设置为
integer
类型。

当我尝试将MySql中的JSON字段更新为大整数时,我看到它被转换为负数。例如,如果我将JSON列更新为{“tax”:2147483648},那么它将变为负数,但是如果我更新为{“tax”:2147483647},它可以正常工作。知道如何修复这种行为吗?