Search code examples
mysqldatabasedrop-database

how to drop a mysql database which is having numbers


I created a mysql database with name 123, when i want to drop it,it is not dropping and throwing error. I used query. DROP DATABASE 123; and also tried DROP DATABASE '123'; . The other databases with name like ABC123 are dropping. Any solution would be greatful.


Solution

  • Try to use this:

    DROP DATABASE `123`
    

    You need to put the name inside the backticks.