【问题标题】:How to query table when table name has hyphen in Redshift Spectrum?Redshift Spectrum中表名有连字符时如何查询表?
【发布时间】:2020-12-16 18:50:18
【问题描述】:

我正在尝试查询一个包含连字符的表。

我尝试过反引号和引号(`、'、"),但它们不起作用。

查询

select * from hubspot.contacts__form-submissions

错误信息:

Error running query: syntax error at or near "-" LINE 7: from hubspot.contacts__form-submissions ^

我没有写权限,所以我不能重命名表。

关于如何查询这个有什么建议吗?

【问题讨论】:

标签: sql amazon-web-services amazon-redshift amazon-redshift-spectrum


【解决方案1】:

试试

select * from hubspot."contacts__form-submissions";

【讨论】:

  • 这太棒了,应该是一个可以接受的答案。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2019-09-20
  • 1970-01-01
  • 1970-01-01
  • 2017-11-23
  • 1970-01-01
  • 2021-01-12
  • 1970-01-01
相关资源
最近更新 更多