[英]Redshift reserved colume name "TIME"
SELECT customerID
FROM tableA
WHERE TIME= 2023-1-9
AND customerID Is Not Null;
In table A there is a column named as TIME and it stores date value.在表 A 中有一个名为 TIME 的列,它存储日期值。 as TIME is a reserved term in redshift, how can i call the column from the query?
由于 TIME 是 redshift 中的保留项,我如何从查询中调用该列?
there is a ERROR: syntax error at or near... from the above query.上面的查询中存在错误:语法错误或接近...。
Solution for your problem:您的问题的解决方案:
SELECT customerID
FROM tableA
WHERE "TIME"= 2023-1-9
AND customerID Is Not Null;
According to redshift docs, double quotation marks(") are required to use reserved words within an identifier. For more info, please go through the below link:根据 redshift 文档,双引号 (") 需要在标识符中使用保留字。有关更多信息,请通过以下链接拨打 go:
https://docs.aws.amazon.com/redshift/latest/dg/r_names.html https://docs.aws.amazon.com/redshift/latest/dg/r_names.html
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.