bugl
bugl
HomeLearnPatternsPathsSearchPremium
HomeLearnPatternsPaths

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL DATABASE() Function

Example

SELECT DATABASE();

Definition and Usage

The DATABASE() function returns the name of the current database.

If there is no current database, this function returns NULL or "".

Syntax

DATABASE()

Technical Details

Works in:From MySQL 4.0

Previous

MySQL CURRENT_USER() Function

Next

MySQL IF() Function