Retrieve the name of the currently selected (default) database.
| SELECT DATABASE(); |
The DATABASE() function retrieves the name of the current database.
If no database is currently selected, the function returns NULL or an empty string.
| DATABASE() |
|
Works in: |
From MySQL version 4.0 |