sql - How to specify a hex character as part of a string in sqlite?
问题描述
Is there a way to specify a hex character in sqlite that is part of a string?
I have a string of the form: 'abc' 0xf1 'def' (the character 0xf1 is the 4th character of the string)
how do I create string so I can do the following query:
select * from table where attribute = 'abc' 0xf1 'def'
thank you in advance for any help.
解决方案
From https://sqlite.org/lang_expr.html#literal_values_constants_
BLOB literals are string literals containing hexadecimal data and preceded by a single "x" or "X" character. Example: X'53514C697465'
In your case: x'F1'
推荐阅读
- json - JSON 中位置 0 的意外令牌 < - Three.js 和 Vue 应用程序中的 glTFLoader
- google-container-registry - 无法在 Drone 插件drone-gcr(和drone-docker)中设置上下文
- angular - 如何以角度创建动态链接按钮
- django - 带有 Jinja2 的 Django:模板搜索路径
- amazon-ecs - 如何更新和 ECS 服务添加一个额外的负载平衡,服务与之对话而不停机?
- reactjs - 自动 DynamoDB 数据库检查 | ReactJS + AWS 放大
- visual-studio-code - 更改vs代码中括号和大括号的颜色
- ruby-on-rails - 恢复数据库后,从相同的 SGID 加载 ActionText::Attachable 不再有效
- javascript - 使用 javascript 抓取网页 - 由于错误 80020101 无法完成操作
- ssh - gitlab runner ssh私钥644文件权限错误