我在 SQL 表中有一个名为的列Date
,但不幸的是,此查询引发了错误:
select Author, Date, Text from Tiny.Comment
我试图用or转义Date
关键字,但这对我没有用。[Date]
'Date'
我在 SQL 表中有一个名为的列Date
,但不幸的是,此查询引发了错误:
select Author, Date, Text from Tiny.Comment
我试图用or转义Date
关键字,但这对我没有用。[Date]
'Date'
在 InterSystems Caché SQL 中有点不同:您需要使用双引号来转义关键字:
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'
您还可以使用 %STRING 函数,例如:
SELECT ID, Super
FROM %Dictionary.CompiledClass
WHERE %STRING(Super) %STARTSWITH %STRING('Base.%')