Postgres drop table syntax error
User
is a reserved keyword in Postgres. You'll have to put it in quotes if you want to refer to an actual table named user:
DROP TABLE "user";
Probably best to stay away from using reserved keywords as table names if you can help it. It usually ends up creating weird problems down the road. Users
might be a better name for a table.
I had the same error. My database name was very unique and not a reserved keyword
. Still needed to wrap the database name with quotation marks
"<database_name>"
Also for those that might forget always add a semicolon ;
at the end of the statement, I always forget.