How should I display MySQL database that is currently in use?


We can display the name of MySQL database that is currently in use by Select Database() command.

mysql> select database();
+------------+
| database() |
+------------+
| tutorial   |
+------------+
1 row in set (0.00 sec)

This command shows that we currently use tutorial database.

Updated on: 28-Jan-2020

57 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements