Mian Asbat Ahmad Mian Asbat Ahmad - 1 year ago 64
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 Source

Use backticks:

DROP DATABASE `dbnameendingin#`