0

I created a database with the name "femme-myp " in postgres. There was no problem while creation or while using tables in python Django. but when i try to drop the database in terminal it says there is an error in the name and it points at the "-" in the name.Is there any way I can drop that database?

ERROR:  syntax error at or near "-"
LINE 1: DROP DATABASE femme-myp;
                           ^

1 Answer 1

3

try with quotes in the database name:

DROP DATABASE "femme-myp";

All identifiers that don't start with a letter and contain characters other than letters, digits and the underscore _ must be quoted.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.