我在 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/