There is no UNUSE . You just select another database and USE it.
From the home screen, right-click on a MySQL connection, choose Edit Connection, and set the desired default schema on the Default Schema box. The selected schema is displayed as bold in the schema navigator. Filter to This Schema: Enables you to target specific schemas in the list.
To stop using a database, you will need to change your database context. For example, if you are trying to drop your database and you are in the context of that database, simply switch to another database (commonly master or tempdb ).
There is no UNUSE
. You just select another database and USE
it.
Bruce Daniels presented an answer at https://web.archive.org/web/20160130220207/https://dev.mysql.com/doc/refman/5.5/en/use.html.
It goes like:
CREATE DATABASE foofoofooweird;
USE foofoofooweird;
DROP DATABASE foofoofooweird;
Et voila, no database is in use.
To be clear, the hack is to CREATE, USE, then DROP (delete) a temporary placeholder database.
It is NOT advocating dropping (deleting) any database you actually use!
All credits to Bruce Daniels!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With