"Syntax error at or near END" with column name END
postgresql
Solution
`END` is a keyword. (Among other things, it's used in `CASE ... WHEN ... END`). You must quote it to use it as an identifier.
create table emp(complete BOOLEAN NOT NULL, "end" BOOLEAN NOT NULL);
Note that `"quoted"` identifiers are case sensitive, they aren't case folded like unquoted identifiers. That's per the SQL standard. For more information, see the PostgreSQL documentation on lexical structure.
There's a list of reserved words in the documentation.
Problem
I have a table in MYSQL and have to convert it in postgresql. I am using the below command to create the table. ``` create table emp(COMPLETE BOOLEAN NOT NULL, END BOOLEAN NOT NULL); ``` the error, I am getting is Error at Command Line : 27 Column : 1 Error report - SQL Error: ERROR: syntax error at or near "END" Position: 45 But if I change the column name END to END1, then it works fine. ``` create table emp(COMPLETE BOOLEAN NOT NULL, END1 BOOLEAN NOT NULL); ``` Please suggest a way through which I can create the name of columnwith END.