Thanks to the 'USE' command I can set the default schema; Is there a similar command in order to get the name of the default schema?
SELECT DATABASE();
should do the trick. Note that this will return NULL
if there is no schema currently selected.
Mysql provides a function to do this:
SELECT database();
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