如何在c中转义SQLite表名的字符串?

问题描述 投票:-1回答:2

如何在c中为SQLite表名转义字符串?

我找到了文档,但没有告诉我详细信息https://www.sqlite.org/lang_keywords.html

并且该文档说sql以'\ x00'https://www.sqlite.org/c3ref/prepare.html结尾”>

这是python中的类似问题:How do you escape strings for SQLite table/column names in Python?

您如何在c中转义SQLite表名称的字符串?我找到了一个文档,但是没有告诉我详细信息https://www.sqlite.org/lang_keywords.html并且该文档说sql以'\ ...

c sqlite
2个回答
0
投票

如果标识符需要转义,则标识符应用双引号引起来,其中所有双引号都通过加倍引号来转义。 bad"name"需要成为"bad""name"才能在SQL语句中使用。


0
投票

示例:

© www.soinside.com 2019 - 2024. All rights reserved.