我在Redshift中名为mm
的列上收到此错误:
select sum(mm) mm from foo;
ERROR: syntax error at or near "mm"
LINE 1: select sum(mm) mm from foo;
^
如果我将列别名为select sum(mm) mm2 ...
mm
有什么特别之处?它不在保留字列表中。
答案 0 :(得分:0)
使用AS
:
SELECT
sum(mm) AS mm
FROM foo