0

how can i delete the database that i am in it in mysql? without knowing the name of the database

DROP DATABASE()
eyal
  • 107
  • 1
  • 7
  • You asked this https://stackoverflow.com/questions/62363389/how-can-i-delete-the-database-that-i-am-in-it-in-mysql-without-knowing-the-name You are not going to get any different answers by reposting the same question.You might try expanding the question to explain why you would not know or cannot acquire the db name, – P.Salmon Jun 14 '20 at 07:16

2 Answers2

2

You can first find the name of current dbname as follow code.

SELECT database()

With this query you'll get the current db name. And after that, just say;

DROP DATABASE databaseName
Engincan Veske
  • 1,300
  • 1
  • 10
  • 16
0

I think it's not possible to drop a database without a name.

redempt
  • 51
  • 1
  • 2