mysql - mysql连接带有数字变量的json路径失败
问题描述
以下语句将正确执行:
select json_contains_path('{"12":12}','one',concat('$."',12,'"'));
但以下将失败并出现错误cant create json with binary string
::
prepare stmt from 'select json_contains_path(\'{"12":12}\',\'one\',concat(\'$."\',?,\'"\'))';
set @n=12;
execute stmt using @n;
这是为什么?我认为它们与变量替换是一样的
解决方案
推荐阅读
- django - OuterRef 与 UUID Django 兼容
- c# - 如何在记录类型中查找更改的属性名称和值?
- pandas - 每列设置数据框样式不起作用
- vba - 尝试运行 Outlook VBA 时收到“此项目中的宏已禁用消息”
- python - win32gui.GetPixel() 不工作:pywintypes.error: (0, 'GetPixel', 'No error message is available')
- callback - 如何在 LambdaCallback 中调用“模型”?
- azure-devops - 是否可以查询 Azure DevOps 中特定字段何时更改?
- python - 将数据框中的周数转换为一周的开始日期(星期一)
- javascript - 从 javascript 以编程方式访问 chrome devtools 网络 API
- python - Pandas DataFrame.agg 在选择缺失类别后生成多索引