博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
SQLiteParameter不能将TableName作为参数
阅读量:7012 次
发布时间:2019-06-28

本文共 1353 字,大约阅读时间需要 4 分钟。

http://stackoverflow.com/questions/1274432/sqlite-parameters-not-allowing-tablename-as-parameter

 

Generally one cannot use SQL parameters/placeholders for database identifiers (tables, columns, views, schemas, etc.) or database functions (e.g., CURRENT_DATE), but instead only for binding literal values.

placeholder 占位符

identifiers 标识符,认同者;检验人,鉴定人

literal 文字的;逐字的;无夸张的

 

With server-side support for parameterized (a.k.a. prepared) statements, the DB engine parses your query once, remembering out the peculiars of any parameters -- their types, max lengths, precisions, etc. -- that you will bind in subsequent executions of the already-parsed query. But the query cannot be properly parsed into its syntactic elements if critical bits, like database objects, are unknown.

peculiar 特权;特有财产

precisions 精度,[数] 精密度;精确

subsequent  后来的,随后的

syntactic  句法的;语法的;依据造句法的

critical  鉴定的;[核] 临界的;批评的,爱挑剔的;危险的;决定性的;评论的

 

So, one generally has to substitute table names oneself, in a stored procedure or in client code which dynamically concats/interpolates/whatevers the SQL statement to be properly executed. In any case, please remember to use your SQL API's function for quoting database identifiers, since the API won't do it for you.

substitute  代用品;代替者

stored procedur 存储过程

concat 合并多个数组;合并多个字符串

interpolate   vt. 篡改;插入新语句    vi. 插入;篡改

 

quote    n. 引用   vi. 报价;引用;引证   vt. 报价;引述;举证

转载地址:http://yiqtl.baihongyu.com/

你可能感兴趣的文章
11.0592M晶振与12M晶振
查看>>
Web Service学习笔记
查看>>
[转帖]cocos2D-X源码分析之从cocos2D-X学习OpenGL(3)----BATCH_COMMAND
查看>>
A380上11万一张的机票什么享受?来看看
查看>>
LeetCode: 103_Binary Tree Zigzag Level Order Traversal | 二叉树Zigzag层次遍历 | Medium
查看>>
JUnit单元测试中的setUpBeforeClass()、tearDownAfterClass()、setUp()、tearDown()方法小结
查看>>
Java程序猿JavaScript学习笔记(2——复制和继承财产)
查看>>
ubuntu15.10下编译安装wine1.8 rc4
查看>>
Hello,HTML 到 HTML5
查看>>
jquery获取节点的时候获取包含自己在内的HTML标签
查看>>
android之AlertDialog 点击其它区域自己主动消失
查看>>
小程序 - 提示框
查看>>
Windows 10下安装配置Caffe并支持GPU加速(修改版)
查看>>
CPU profiling
查看>>
feign调用接口session丢失解决方案
查看>>
利用 SPL 快速实现 Observer 设计模式
查看>>
本体感受和演讲能力
查看>>
Spring MVC+Ant+Tomcat+Eclipse最简单的demo
查看>>
JavaScript 对象
查看>>
UrlDecode
查看>>