Postgres - 列名中的空格和特殊字符 - 如何在查询中选择这些

Gee*_*eme 2 sql postgresql

我在 postgres test1 和列"Username","# of Applications", "# of R Applications" 中有表。

当尝试使用选择查询查询这些时,我收到错误 -

select Username, "# of Applications","# of R Applications" from public.test1 
Run Code Online (Sandbox Code Playgroud)

错误 ERROR:列“用户名”不存在 第 1 行:从 public.test1 中选择用户名、“应用程序数量”...

同样对于所有其他 2 列也是如此....

我如何在选择查询中选择这些列?

the*_*mix 8

Username没有被引用,所以变成username了错误所暗示的。

如果您的表有一个名为 的列Username,这应该可以工作

select "Username", "# of Applications","# of R Applications" from public.test1 
Run Code Online (Sandbox Code Playgroud)