CURRENT_DATABASE
Returns a VARCHAR value containing the name of the database to which you are connected.
Behavior Type
Syntax
CURRENT_DATABASE()
Notes
- The parentheses following the CURRENT_DATABASE function are optional.
- This function is equivalent to
DBNAME .
Examples
=> SELECT CURRENT_DATABASE(); CURRENT_DATABASE ------------------ VMart (1 row)
The following command returns the same results without the parentheses:
=> SELECT CURRENT_DATABASE; CURRENT_DATABASE ------------------ VMart (1 row)