intersystems-cache - 如何转义 InterSystems Caché SQL 中的保留字(关键字)?

标签 intersystems-cache intersystems

我在 SQL 表中有一个名为 Date 的列,但不幸的是此查询抛出错误:

select Author, Date, Text from Tiny.Comment

我尝试使用 [Date]'Date' 转义 Date 关键字,但这对我来说从来不起作用。

最佳答案

在 InterSystems Caché SQL 中有点不同:您需要使用 double quotes转义关键字的符号:

select Author, "Date", Text from Tiny.Comment

这也有效:

select Author, myTable."Date", Text from Tiny.Comment as myTable where "Date"='2017-11-03 11:09:28'

关于intersystems-cache - 如何转义 InterSystems Caché SQL 中的保留字(关键字)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47100438/

相关文章:

string - 比较系统间缓存对象脚本中的字符串

sql - 将金钱转换为文本并保持格式

intersystems-cache - 更新由向导基于类生成的表单

通过 Globals API 的 Java 连接导致 StackOverflowError

mysql - intersystems - 缓存数据库 - 数据库模型

intersystems-cache - 使用其中一个属性的唯一值搜索对象的最佳方法

database - InterSystems Caché - 如何访问 Caché Studio?

InterSystems Caché 中针对 DeepSee MDX 查询的 JSON 数据