Mian Asbat Ahmad Mian Asbat Ahmad - 24 days ago 6
MySQL Question

I am unable to delete a database in mysql ending in pound '#'

I created a database xyz# in MySQL accidentally when I was trying to create xyz. Now when I try to drop it, I get to the next line. I searched online but no luck. I tried escape characters / \ and single and double quote to consider # name of the database but no luck.
Any idea how to delete a database ending with #. Thanks

Answer

Use backticks:

DROP DATABASE `dbnameendingin#`