Other
current_database()
Overview
The current_database() is a session information function that returns the current database’s name.
Syntax
The syntax forcurrent_database()
function is as follows:
Example
In the following example, we will obtain the database name to which we are currently connected:
By executing the query above, we will get the following output: