I was designing a project which specifies that in a table what column name should be and one of the column name in the specification is "group".
I tried creating it but it always throw a syntax error near the word = "group"
. I am really curious since the keyword in SQL is "group by" not group, so what is the reason, I cannot rename or create a column with a name "group".
Syntax and error I am using and getting:
ALTER TABLE test RENAME COLUMN sum TO group;
ERROR: syntax error at or near "group"
LINE 1: ALTER TABLE test RENAME COLUMN sum TO group;