eyal
eyal

Reputation: 107

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

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

DROP DATABASE()

Upvotes: 0

Views: 992

Answers (2)

Engincan Veske
Engincan Veske

Reputation: 1585

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

Upvotes: 2

redempt
redempt

Reputation: 51

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

Upvotes: 0

Related Questions