Collections:
DATABASE() - Name of Current Database
How to obtain the name of the current database using the DATABASE() function?
✍: FYIcenter.com
DATABASE() is a MySQL built-in function that
returns the name of the current database.
For example:
USE mysql; Database changed SELECT DATABASE(); -- +------------+ -- | DATABASE() | -- +------------+ -- | mysql | -- +------------+
Reference information of the DATABASE() function:
DATABASE(): name Returns the name of the current database. Arguments, return value and availability: name: Return value. The name of the current database. Available since MySQL 4.0.
⇒ FOUND_ROWS() - Row Count from Last SELECT Statement
⇐ CURRENT_USER() - Authentication Name of Current User
2025-06-18, 1782🔥, 0💬
Popular Posts:
How To Locate and Take Substrings with CHARINDEX() and SUBSTRING() Functions in SQL Server Transact-...
What Is the Difference Between GETDATE() and GETUTCDATE() in SQL Server Transact-SQL? The difference...
How To Format Time Zone in +/-hh:mm Format in SQL Server Transact-SQL? From the previous tutorial, y...
How To Round a Numeric Value To a Specific Precision in SQL Server Transact-SQL? Sometimes you need ...
Where to find reference information and tutorials on MySQL database functions? I want to know how to...